Trying to replicate DeviceOrientationInput

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

Why not replicating and tweaking the input itself ? Babylon.js/freeCameraDeviceOrientationInput.ts at master · BabylonJS/Babylon.js · GitHub

Because my camera is moved and rotated programatically.

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