Drag Object on XZ Plane exactly along Mouse Pointer

I’ve got slightly different approach.
Set that XZ-plane at y-coordinate of the point of intersection with an object. Then calculate the shift between the point of intersection and object’s position. And then take that shift in count, relatively to the point of intersection between raycaster’s ray and the XZ-plane, that was set before.
The example is in this post: Where do I find the spline editor?
Or here: https://hofk.de/main/discourse.threejs/2018/interactiveShape/interactiveShape.html

1 Like