A good snapping example

Can someone help me with a good example of snapping a mesh to position next to another mesh while dragging the mesh close to the other mesh? - Thanks in advance.

On behalf of the entire crew, I would like to welcome you! :slight_smile:

This may be can a first approach to your problem:
https://www.babylonjs-playground.com/#8PY6X5#18

2 Likes

Here is an other example:
https://www.babylonjs-playground.com/#4HUQQ#327

click the left mouse button on an empty spot and keep it pressed, move the mouse to position the box. release the mouse button.
repeat.
the next box will be snapped to the other boxes to any site.

you should switch off the gravity or set the mass of the boxes to 0 so they don’t jump arround.

3 Likes

Thank you. I will look into these examples. :slightly_smiling_face: