Get mobile orientation (tilt, left/right/up/down & compass)

  • 15 favourites

Attached Files

The following files have been attached to this tutorial:



1,801 visits, 2,690 views


This tutorial hasn't been translated.


Hi, I have just written a capx to display the mobiles orientation, the capx is fully commented.

It uses the touch.alpha, touch.beta and touch.gamma to find if the user is tilting their phone, up/down/left or right, I have added a simple compass also.

You have to enable preview over LAN to see this on mobile, or if you cant I have put an example here, which will work on most mobiles.

Link To Demo


  • Order by
Want to leave a comment? Login or Register an account!
  • It doesn't work anymore?

    Or do we have to change something in the config file?