Here's an updated project file with up,dn,left,right tilt. Turns out we needed to use accelerometer Z (roll), not x. Also, to move along x-axis, we use accelerometer Y; so I apologize for the wrong instruction before.
2 years later and this is still helpful. thanks! I know it has been a while, but can you explain why you use accelerometer.Z instead of X? Also, why do you set the center point in the demo provided? Thanks!
I've got this method working pretty well in my game Airlift but someone recently pointed out that if you tilt the device too far up then you go down instead of up. I noticed this happens in the demo as well.
I assume this happens because the orientation flips, But it happens even if you lock the orientation of the screen by only checking landscape right when publishing. I tried unchecking all of the auto-rotates in the scene attributes but that didn't have any effect.
Perhaps it has something to do with the Z axis instead?
I know this thread is pretty old, but I only just signed up with GS and came across it now. This stuff is awesome! I was wondering if you could post the project file with up, down, left, right movement again? The Dropbox links in the thread are no longer working. Thanks so much in advance!
@ericzingeler , @RThurman - Thanks Eric, for the code, and the kindness of RThurman in making it available after the Dropbox links died - owe you guys big time!!!
Comments
2 years later and this is still helpful. thanks! I know it has been a while, but can you explain why you use accelerometer.Z instead of X? Also, why do you set the center point in the demo provided? Thanks!
This might help explain it for you. It is for windows but is really for any accelerometer. 'Z always starts by pointing down'. http://tutorial.programming4.us/windows_phone/sensors-and-services---accelerometer.aspx
From @ericzingeler
I've got this method working pretty well in my game Airlift but someone recently pointed out that if you tilt the device too far up then you go down instead of up. I noticed this happens in the demo as well.
I assume this happens because the orientation flips, But it happens even if you lock the orientation of the screen by only checking landscape right when publishing. I tried unchecking all of the auto-rotates in the scene attributes but that didn't have any effect.
Perhaps it has something to do with the Z axis instead?
Hi @ericzingeler
I know this thread is pretty old, but I only just signed up with GS and came across it now. This stuff is awesome! I was wondering if you could post the project file with up, down, left, right movement again? The Dropbox links in the thread are no longer working. Thanks so much in advance!
Here is the whole of the technique:
@ericzingeler , @RThurman - Thanks Eric, for the code, and the kindness of RThurman in making it available after the Dropbox links died - owe you guys big time!!!
No problem! Glad its going to help.
@RThurman Thanks for the whole technique. This is really cool.
@iansmale I have been around since 2012 but only just found this thread. Thanks for asking about it and reincarnating it.
I just love it when we uncover little gems like this in GS.