# Intersection detection

**URL:** <https://forum.babylonjs.com/t/intersection-detection/7956>\
**Category:** Questions\
**Created:** [January 10, 2020, 9:42am UTC](https://forum.babylonjs.com/t/intersection-detection/7956 "2020-01-10T09:42:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lp920133349](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@lp920133349](https://forum.babylonjs.com/u/lp920133349)\
**Post date:** [January 10, 2020, 9:42am UTC](https://forum.babylonjs.com/t/intersection-detection/7956/1 "2020-01-10T09:42:35Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/e/ef870738a08548a04717df78e7b91bf514474484.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/a/ac6b3f293d95263b33e83a684d41a41143b146d3.png)  
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)});

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [January 10, 2020, 10:03am UTC](https://forum.babylonjs.com/t/intersection-detection/7956/2 "2020-01-10T10:03:55Z")

</div>

Here is a quick playground that should work like you want.

[https://www.babylonjs-playground.com/#2J3J5Z](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.
