The docs say “The distance from the ray origin to the impact point.”
But I’m having a problem here. If my code says this:
int count = rb2d.Cast (move, contactFilter, hitBuffer, distance + 5);
hitBufferList.Clear ();
for (int i = 0; i < count; i++) {
hitBufferList.Add (hitBuffer [i]);
print (hitBuffer [i].distance);
}
Shouldn’t that print the same thing - if the code was the same but there was no +5?
For what i’m printing, isn’t that the distance from the cast origin (rb2d.position) to the first point of contact the cast made with a collider?