It is my goal to align a mash component to be as close as possible to the given points.
To realize this I need a function which calculates the distance of a point to the given mesh.
Then it is a trivial optimization problem of the function f(u,v,z) = min.
Is there a quick calculation method for this?
Please keep mention that I do not want to figure out how far the object is away. I do want the distance (closest point) between the mesh and the given point.
**
**
Thank you for your ideas!