Help find a solution

The object changes position along two axes (x,z) and follows the mouse pointer
GridHelper - enabled
Please tell me how to make the object following the mouse pointer, figuratively speaking, attach to the intersections of the grid (4 points of the square of the grid) on the grid there are a lot of squares

Hope this example helps.

that box does exactly that, track objects along x/z (but on object-drag). the trick is plane project

e.ray.intersectPlane(plane, point)
1 Like