I gave the above each small box set up collision test, but to move in the process of using the mouse drag box, box will overlap, crash test failed, what should I do, this is a drag and drop box code item. DragBehavior = new BABYLON. PointerDragBehavior ({dragAxis: new BABYLON. Vector3 (1, 0, 0)});
Here is a quick playground that should work like you want.
https://www.babylonjs-playground.com/#2J3J5Z
Click and drag the box in the middle. You’ll see you can push the other ones.
Basically, you create your boxes and a ground. Add an impostor for each one. Then your PointerDragBehavior.
1 Like