How to get the length of Intersection of a block with a ray?

this Picture from Topic describes what I need.

I want to get the length of Intersections between the two parts, or the magnitude between both the intersections.

You can use the .Position property of a RaycastResult to know where the intersection positions are and calculate accordingly (via Magnitude). For the first part hit, you could (with raycast params) blacklist the part that was hit, and raycast again using the same direction as the first ray cast, thus getting your 2 points

1 Like