Move to mouse position but only left,right,up or down

Fredrik BixoFredrik Bixo Member Posts: 239
edited June 2012 in Working with GS (Mac)
As the title above I'm wondering how make an actor move up,left,right or down by the position of your mouse. like if you have the mouse in right of him he move 0 degrees even if it is like 10 degrees.

Answers

  • HapiappsHapiapps Member Posts: 373
    edited June 2012
    Here are some pics of the code:

    Image and video hosting by TinyPic

    Image and video hosting by TinyPic

    Depending on the size of the actor, 50 may or may not be good. 1/2 of the height instead of 50 for the y. 1/2 of the width for the x.
  • Fredrik BixoFredrik Bixo Member Posts: 239
    Thank you it worked perfectly!
Sign In or Register to comment.