Can RayIntersectsBox calculate intersection inside out?

Or any hint on how to calculate the intersection of the ray on the box from the inside?

Conceptually I think a ray should always intersect a box twice, an in point and an out point.

However looks like the stride implementation only returns one point

I guess best way to hack it is to make a ‘box of boxes’ where your ray casting point is surrounded by 6 thin boxes representing the sides of your desired primary box.

1 Like

@tobyk, forgot to attach a screenshot, but you got the situation right — intersection of a ray from the inside of a cube will be a starting point
Seems like you are right and the only appropriate solution is to do this with a hack