What is the math behind Collider.ClosestPointOnBounds?
I have been trying to find documentation shows the math behind the "Collider.ClosestPointOnBounds" method, but I have not been able to find anything. Have you guys seen anything related to this???
Comment
Unity uses PhysX and their API does not show their function internals. that's what I know
Answer by WamboGer · Feb 26, 2018 at 06:36 PM
It is quite easy to calculate. You can just clamp the point to min and max of the bounding box.
See here: Game Physics Cookbook