# Trying to replicate DeviceOrientationInput

**URL:** <https://forum.babylonjs.com/t/trying-to-replicate-deviceorientationinput/22065>\
**Category:** Questions\
**Created:** [July 1, 2021, 6:12pm UTC](https://forum.babylonjs.com/t/trying-to-replicate-deviceorientationinput/22065 "2021-07-01T18:12:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Escobar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/escobar/32/2726_2.png) [@Escobar](https://forum.babylonjs.com/u/Escobar)\
**Post date:** [July 1, 2021, 6:12pm UTC](https://forum.babylonjs.com/t/trying-to-replicate-deviceorientationinput/22065/1 "2021-07-01T18:12:13Z")

</div>

Since I need to use my own controls I cannot just add it as input so I tried to replicate its behavior by digging in the code, but unfortunately, I’m driving nuts with that and two axis seems to be working ok but the third one becomes mad.

Any help is really welcome since I’m starting to be insane about that.

[https://www.babylonjs-playground.com/#CV09JI#15](https://www.babylonjs-playground.com/#CV09JI#15)

---

<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:** [July 1, 2021, 8:01pm UTC](https://forum.babylonjs.com/t/trying-to-replicate-deviceorientationinput/22065/2 "2021-07-01T20:01:01Z")

</div>

Why not replicating and tweaking the input itself ? [Babylon.js/freeCameraDeviceOrientationInput.ts at master · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/Inputs/freeCameraDeviceOrientationInput.ts)

---

<div class="post-metadata">

**Author:** ![Escobar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/escobar/32/2726_2.png) [@Escobar](https://forum.babylonjs.com/u/Escobar)\
**Post date:** [July 1, 2021, 9:48pm UTC](https://forum.babylonjs.com/t/trying-to-replicate-deviceorientationinput/22065/3 "2021-07-01T21:48:37Z")

</div>

Because my camera is moved and rotated programatically.

---

<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:** [July 1, 2021, 9:52pm UTC](https://forum.babylonjs.com/t/trying-to-replicate-deviceorientationinput/22065/4 "2021-07-01T21:52:40Z")

</div>

yup but by modifying the source and creating your own input you could handle both ?
