How do raycasts calculate distance?

I’m having trouble with a complicated problem and I’m worried the raycasts may be messing everything up. I was thinking, do they calculate the distance from the center of the object or from the edge of the hitbox?


I don’t know but you should be able to test this (you have indie so you can make another game), by making a raycast touch the edge and then test the center.

the edge of the hitbox

Actually, there is a problem with the raycast in Flowlab. It’s detects the raduis of the center of the object. This is also a big issue with objects that are long because the distance doesn’t match up.

Tinksersmith goes over it in more detail:
raycaster games - #10 by TinkerSmith