Accelerometer rotation
FanStudioUK
Member Posts: 459
Hi guys,
Can someone help me with an accelerometer rotation example ?
I'm playing with the Rotate to Angle behavior but I can't get it work...
Can someone help me with an accelerometer rotation example ?
I'm playing with the Rotate to Angle behavior but I can't get it work...
Comments
So, when I rotate the phone, the actor should rotate smoothly to that direction and move up or down on his Y axis.
Any idea how can I achieve this? I've searched for tutorials but I haven't found nothing helpful.
Thank you
@scitunes your silky smooth demo is very nice, but I also need my actor to rotate to the position he's heading to... how can I achieve that?
The code I'm using is:
Constrain - self.Rotatio to vectorToAngle(-game.Accelerometer.Y,-game.Accelerometer.X)-90
My question is now, how can I restrict my actor to rotate between 2 angles???
See the picture below...
LATER EDIT: Problem solved!
What I have to do now is to make the particles rotate after the actor.