RaycastHit.distance

Hi, I'm wondering if RaycastHit.distance is the percentage the ray traveled (like a hitDelta) or if it's the number of units it travelled.

I'm trying to do some fake gravity for something cheaper than using rigid body (several hundred at once and they only need to move straight down) so when it hits something I need to only move it by the percentage the ray failed by and I'm not sure if I should divide RaycastHit.distance by total distance to get the percentage traveled, Thanks.

It's the distance between your ray start point and the hit point in worldunits. It's the same as:

(RaycastHit.point - RayStartPoint).magnitude