Rotate using Accelerometer

I have an actor that move left and right across the screen based on the accelerometer.

All I want to do is have the actor rotate slightly when move left and right. I have searched the forums and tried multiple methods with no success!

Any ideas would be great appreciated!

-Kyle [import]uid: 9968 topic_id: 5863 reply_id: 305863[/import]

How would you be holding your device, upright, or level to the ground. I’m not sure how to do it upright, but you could make the object rotate based on the x y or z gravity. have a look @ this

http://developer.anscamobile.com/content/events-and-listeners [import]uid: 7116 topic_id: 5863 reply_id: 20262[/import]

Holding it upright is how I will use it.

What I have tried is setting the object rotation to event.xGravity in the listener function but it does not work.

I just need a generic straight forward way to make it functional, and I cannot find any documents or examples to simply change object.rotation based on accelerometer data.

Any one have an easy way to do this?

Thanks! [import]uid: 9968 topic_id: 5863 reply_id: 20276[/import]

you could maybe use a pivot so that one side of the object would be heavier and rotate based on how you tilt the device. I am new to this, so I cannot be sure… [import]uid: 7116 topic_id: 5863 reply_id: 20285[/import]