Hey guys,
I have been having problems getting what should be a simple tilt control working.
Basically, the game is in landscape mode, and you play with the screen facing you ( oriented as if you were holding it to a wall, and not on a table ). Like using the iPhone as a steering wheel.
What I want to do is trigger whatever event when you tilt past a certain angle to the left, and trigger a different event when you tilt past an angle to the right, and do nothing if the phone is held level. I don’t need a lot of smoothing or filters as it’s just a simple on or off situation.
Would anyone be able to provide some advice on how to do this properly?
Thanks,
-Jeremy