# 3 axis movement (flight) in WebXR

**URL:** <https://forum.babylonjs.com/t/3-axis-movement-flight-in-webxr/23413>\
**Category:** Questions\
**Tags:** webxr\
**Created:** [August 29, 2021, 5:18am UTC](https://forum.babylonjs.com/t/3-axis-movement-flight-in-webxr/23413 "2021-08-29T05:18:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimIsRad](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/timisrad/32/18241_2.png) [@TimIsRad](https://forum.babylonjs.com/u/TimIsRad)\
**Post date:** [August 29, 2021, 5:18am UTC](https://forum.babylonjs.com/t/3-axis-movement-flight-in-webxr/23413/1 "2021-08-29T05:18:51Z")

</div>

Hello!

Dabbling with WebXR in BabylonJS and loving it - thanks for a great framework.

I’ve stood up a simple example in WebXR with a floor mesh and teleportation disabled, and tested in the Oculus Quest - [https://playground.babylonjs.com/#3IBMG7#1](https://playground.babylonjs.com/#3IBMG7#1).

I had wrongly assumed that the default camera movement would be like it is in the playground on desktop. That we could move freely through all 3 axes (x,y, and z). Instead, we’re moving like an FPS. Makes sense, but I’m hoping to be able to fly!

So - my question. Is there any _easy_ way to achieve this in XR?  
Or will I have to write the code to have the controllers directly manipulate the camera? If so, I’ll give it a crack.

I’ve tried playing with customRegistrationConfigurations in the BABYLON.WebXRFeatureName.MOVEMENT feature, but the axisChangedHandler seems to only deal with the X and Y axes, so I’ve figure this is not a viable way to achieve it.

Any advice would be greatly appreciated!

Thanks,  
Tim Farr

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [August 30, 2021, 1:31pm UTC](https://forum.babylonjs.com/t/3-axis-movement-flight-in-webxr/23413/2 "2021-08-30T13:31:17Z")

</div>

Adding our VR/XR expert @RaananW

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [August 30, 2021, 1:31pm UTC](https://forum.babylonjs.com/t/3-axis-movement-flight-in-webxr/23413/3 "2021-08-30T13:31:25Z")

</div>



---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [August 30, 2021, 2:34pm UTC](https://forum.babylonjs.com/t/3-axis-movement-flight-in-webxr/23413/4 "2021-08-30T14:34:41Z")

</div>

> [@TimIsRad](#):
>
> but I’m hoping to be able to fly!

Aren’t we all… 🙂

I totally support that 🙂 Let me see how we can adjust the movement component to be closer to the freecamera’s keyboard “forward” movement.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [August 30, 2021, 4:03pm UTC](https://forum.babylonjs.com/t/3-axis-movement-flight-in-webxr/23413/5 "2021-08-30T16:03:10Z")

</div>

You can now fly like an eagle - [[XR] Allow movement on the Y axis with controllers by RaananW · Pull Request #10951 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/10951)

(Only after it is merged and nightly was built :-))

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [August 30, 2021, 4:03pm UTC](https://forum.babylonjs.com/t/3-axis-movement-flight-in-webxr/23413/6 "2021-08-30T16:03:14Z")

</div>



---

<div class="post-metadata">

**Author:** ![TimIsRad](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/timisrad/32/18241_2.png) [@TimIsRad](https://forum.babylonjs.com/u/TimIsRad)\
**Post date:** [September 1, 2021, 10:01pm UTC](https://forum.babylonjs.com/t/3-axis-movement-flight-in-webxr/23413/7 "2021-09-01T22:01:24Z")

</div>

Thanks RanaanW! That is amazing and works like a charm. Exactly what I’m after.

Really appreciate the work that you guys put in on this framework, and hope you have a smashing day.

Tim
