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

3

Attached Files

The following files have been attached to this tutorial:

.capx

Stats

4,124 visits, 5,814 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 27 Sep, 2015. Last updated 19 Feb, 2019

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

.CAPX
  • 4 Comments

  • Order by
Want to leave a comment? Login or Register an account!