Rotating actor according to mouse movement
michelmfreitas
Member Posts: 2
Hello everybody, I'm new here and with GameSalad forum, so excuse me if I'm posting in the wrong place.
Created an actor, like an arrow in the game Angry Birds. This actor rotates according to the angle of the mouse. However, I can not apply these properties of rotation.
Added a behavior RotateToAngle this actor with the formula VectorToAngle (game.Mouse.position.x - self.position.x, game.Mouse.position.y - self.position.y), but it does not work. I think this reasoning is right.
Can you help me?
Files in http://www.sendspace.com/file/mugnza
Created an actor, like an arrow in the game Angry Birds. This actor rotates according to the angle of the mouse. However, I can not apply these properties of rotation.
Added a behavior RotateToAngle this actor with the formula VectorToAngle (game.Mouse.position.x - self.position.x, game.Mouse.position.y - self.position.y), but it does not work. I think this reasoning is right.
Can you help me?
Files in http://www.sendspace.com/file/mugnza
Comments
Try this:
(file attached)
But I need the angle of the arrow, because the arrow will shoot a ball with the click of a mouse. So i used the VectorToAngle. It's wrong?