How to drag an object on the surface

image
I want to limit this point to dragging and dropping on the surface of an object, is there a good way

One simple solution is to use raycasting. Meaning you cast a ray based on the position of your red point and a direction vector that points towards the blue surface. You can then allow a transformation of your point as long as the ray intersects the surface. If no intersection is detected, the point is obviously “outside” of the surface.

1 Like

Something related: Wrong normal with raycaster - #5 by prisoner849

oh,that sound great,thanks boss