#UnityTips Here is a little gist to find the closest point on a ray to a given point.
It also gives you the the distance in an out parameter without any square roots!
If the point is „behind“ the ray’s origin the closest point is the origin!#math #gamedev #indiedev pic.twitter.com/BLbpZuEAkT
— Binary Impact (@BinaryImpactG) February 27, 2024