Rotating actor according to mouse movement

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

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    @michelmfreitas

    Try this:

    (file attached)
  • michelmfreitasmichelmfreitas Member Posts: 2
    edited June 2013
    It's work!

    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?
Sign In or Register to comment.