iPhone tilt direction

Posted by Tate Allen on Stack Overflow See other posts from Stack Overflow or by Tate Allen
Published on 2010-05-30T18:27:06Z Indexed on 2010/05/30 18:32 UTC
Read the original article Hit count: 393

Filed under:
|
|
|
|

Hi all, I am making a simple, tilt controlled game using UIKit. So far, when I tilt the device the character moves in the appropriate direction. What I want him to do is to change the direction he is facing when I tilt the device. For example, when I tilt it left, I want the character to face left. Is there a way to detect whether the device was tilted left or right? If so, could you point me in the right direction please. Thanks, Tate

© Stack Overflow or respective owner

Related posts about SDK

Related posts about accelerometer