How to find the closest point on a vector from a position

I was wondering how I would be able to accomplish something as shown in this very well made graphic, where I am able to find the closest point on a vector to a position.


I am not super experienced on math stuff with vectors, and most of the topics I got when searching for this did not really do what I wanted. Thanks in advance.

Nevermind, turns out I can use Ray:ClosestPoint() because the Ray object is not actually deprecated itself, just the :FindPartOnRay() method. (I originally made this because I wanted to find a non-deprecated solution)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.