Android How do I rotate 360 degree using tilt

J

jakekravitss

Guest
I have a game where I want to be able to rotate the phone like a compass (holding it flat) a full 360 degree in clockwise or anticlockwise direction but I looked up and tried device get tilt x, y and z but it only seems to rotate halfway and doesn't work holding the phone flat.
 
T

TinyGamesLab

Guest
Won't work. Tilt uses accelerometers and if you rotate a flat phone you won't be changing the acceleration on any of the x,y and z axes.
The only way to do it is to work with the internal compass of the phone. I believe there is an asset at the marketplace that integrates the compass into game maker.
 
J

jakekravitss

Guest
Won't work. Tilt uses accelerometers and if you rotate a flat phone you won't be changing the acceleration on any of the x,y and z axes.
The only way to do it is to work with the internal compass of the phone. I believe there is an asset at the marketplace that integrates the compass into game maker.
The compass one on the market which I tried doesn't use the compass sensor, its just a compass where what ever direction you tap on the screen moves the compass in that direction.
 
Top