Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Relative device rotation — Gideros Forum

Relative device rotation

ar2rsawseenar2rsawseen Maintainer
edited August 2012 in General questions
Hello,
This is what I'm experimenting with for a gameplay of one of my apps, where the character moves based on device rotation (the same as Labyrinth game). Problem is, that I don't want to force a player to hold the device parallel to the floor while playing (that's just sucks).
So my idea was to get current rotation of device and only use the relative movement. So take the position in which user starts the app and start from that (cause that would be just awesome).

Unfortunately as using accelerometer, acceleration that you get is basically due to gravity (its not that you have to move your device all the time, you simply lean it a bit and let the ball roll, let the gravity do its job) and if I want to use relative position, I can't count on gravity anymore (at least I can't find the way).

Next idea was to try gyroscope. I've implemented relative movement with gyroscope and it worked great. But over the time it begin to behave weird. I've tried to simply put my phone on the table and saw that gyroscope accumulates too much error (at least on my 4gen Ipod), that even low pass filter can't help it. (I've also tried high pass, just for testing and even it accumulated huge error over the time).

So if anyone can point me into right direction to implement relative accelerometer movement or proper filter to gyroscope. Please, I'm all ears ;)

Likes: r033rt

+1 -1 (+1 / -0 )Share on Facebook

Comments

Sign In or Register to comment.