# PointerDragBehavior with two dragAxis

**URL:** <https://forum.babylonjs.com/t/pointerdragbehavior-with-two-dragaxis/152>\
**Category:** Questions\
**Created:** [December 11, 2018, 11:09am UTC](https://forum.babylonjs.com/t/pointerdragbehavior-with-two-dragaxis/152 "2018-12-11T11:09:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bestog](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bestog/32/89_2.png) [@bestog](https://forum.babylonjs.com/u/bestog)\
**Post date:** [December 11, 2018, 11:09am UTC](https://forum.babylonjs.com/t/pointerdragbehavior-with-two-dragaxis/152/1 "2018-12-11T11:09:28Z")

</div>

Is it possible to determine the axis on which the mesh can be moved? For example, I would like to say that I want to move the object in the x axis as well as in the z axis.  
When I define `{dragAxis: new BABYLON.Vector3(1,0,1)}` it moves the element only diagonally. Is there a workaround?

Thank you.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [December 11, 2018, 2:39pm UTC](https://forum.babylonjs.com/t/pointerdragbehavior-with-two-dragaxis/152/2 "2018-12-11T14:39:15Z")

</div>

Pinging @trevordev

---

<div class="post-metadata">

**Author:** ![trevordev](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevordev/32/16_2.png) [@trevordev](https://forum.babylonjs.com/u/trevordev)\
**Post date:** [December 11, 2018, 6:20pm UTC](https://forum.babylonjs.com/t/pointerdragbehavior-with-two-dragaxis/152/3 "2018-12-11T18:20:00Z")

</div>

For 2 axis you need to use the drag plane in the constructor instead: [Babylon.js Playground](https://playground.babylonjs.com/#TH4TT9)

For dragging in the x and z axis you need a plane facing up  
new BABYLON.PointerDragBehavior({dragPlaneNormal: new BABYLON.Vector3(0,1,0)})
