1

I have this mobile game I made, and I’m wondering if you can access the gyroscope or accelerometer of a mobile device to move a character. Basically, I want the user to be able to tilt his device like a steering wheel to move a character. I don’t really have any code to show, although I have tried these websites solutions: https://www.dummies.com/programming/programming-games/how-to-add-tilt-controls-to-your-html5-game/

How to access accelerometer/gyroscope data from Javascript?

They haven’t worked for me? So is there any idea how to?

  • Does this answer your question? [How to access accelerometer/gyroscope data from Javascript?](https://stackoverflow.com/questions/4378435/how-to-access-accelerometer-gyroscope-data-from-javascript) – Sinclair Chen Oct 27 '20 at 23:23
  • No, sorry, that website is not working for me. I added that in my question now to clear confusion. –  Oct 31 '20 at 00:00

0 Answers0