The Ray:ClosestPoint function documentation doesn’t specify that a unit ray is required.
It was documented correctly on the old wiki:
The Ray:ClosestPoint function documentation doesn’t specify that a unit ray is required.
It was documented correctly on the old wiki:
I believe the older description is easier to understand as well. The newer one sounds a bit more confusing.
Okay I just spent 2 hours trying to figure out why my closest point was 150,000 studs away because of this misleading documentation. Could someone please update it to save the next person? Or even future me?
Sorry to bump this thread, but the problem is still there. The wiki remains unchanged, and like @CJ_Oyer I just spent a stupid amount of time trying to figure out why Ray:Distance() and Ray:ClosestPoint were returning absurdly high values. The new wiki page does’t tell you that to correctly use this, it must be a Unit ray.
The reason I have returned to this post is because I just wasted another hour of my life. It’s an absurd and depressing feeling.
Just ran into this after wasting an hour debugging.
Fix is long overdue.