Porting an older game I previously created for IOS.
This made use of the accelerometer for controlling the main player.
Build a phaser 3 app and used the
window.addEventListener(“deviceorientation”, handleOrientation, true);
to detect tilt and move the player.
Not very clean. Is there a recommended way to do this?
Also is there a way to detect if a device even has an accelerometer?
Also is there a way to set the device;s orientation and freeze it.
Such as making it horizontal.
Should a separate framework be used for this such as gyro.js or should phaser 3 suffice?
Thanks but I did look at this prior and the problem is that it just does not work very well.
And there are items missing, like locking the devices orientation.