In this scenario https://www.babylonjs-playground.com/#YTVDR0#2 I have 2 black boxes.
The first box is following the mouse and the other (box2
) is positioned at (1,1,1).
While the fist box
is moving, I want it to snap on the local X OR Z axis of box2
.
The first box doesn’t have to stay on the local axis all the time. Just need to snap when its nearby.
How can I achieve this?