Rayshoot not working properly

Hey everyone,

I am trying to do a raytracing simulation using rayshoot from rhino common api. My ray tracing works great for intersections with the side opposite to the point but seems to not work too well for the intersections with adjacent sides.
I am not sure why, any help is appreciated.
Thanks.

Raytracing.gh (50.8 KB)