0
\$\begingroup\$

I am developing a game in android and I want to be able to use device rotation for moving. So, I am not sure what sensors should I use. I tried gyroscope, it will do, but there are not a lot of devices that supports gyroscope sensors. So, I want to use rotation around x,y,z axis not change like landscape/portrait mode. What sensors would be the best? I already tried to google it but I couldn't find anything.

\$\endgroup\$
0
\$\begingroup\$

Use the rotation vector sensor. This combines the gyroscope, compass and acceleration sensors and outputs a vector pointing in the same direction as the phone.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.