Reputation: 1322
I’m making an VR game where the user can load a 3D model from a server and place tooltips over it to display info about specific points, so, I’m creating the logic to place the tooltips in a 3D space.
I need to get the closest point on bounds to create a vector between it and the tooltip’s attach point, so I can use that direction to place the tooltip without colliding with the mesh, the problem is, the meshes are concave most of the times, therefore the anchor point of the tooltip is inside the bounds, so Collider.ClosestPointOnBounds will not work properly.
Is there a way to get ClosestPointOnBounds when the position is inside the bounds?
Upvotes: 0
Views: 303