Android : How to know an Android looks whether upwards or downwards?

on Tuesday, September 23, 2014


I'm now creating AR application for Android, but a problem was happened. By my implementation, a sensor show a same pitch even though the Android looks upwards or downwards. Following picture shows what I want to say.


what_I_want_to_say


The sensor shows that pitch == -90 if I grab Android horizontally. The problem is that I cannot detect a != b.(The sensor says a == b.) Can anyone knows how to know an Android looks upwards or downwards? The orientation of Android must be portrait.


0 comments:

Post a Comment