How to make that actor faces the direction where it goes

Mile1Mile1 Member Posts: 10
edited December 2011 in Working with GS (Mac)
I hope you've understanded the question from the title...
(exsample: when super mario goes left he is faced left...when he goes right he is faces right)

P.S. my actor is not controled by me, it's moving on his own in random way and collides with walls.
So i want to do when he goes left he is faced in the left direction and when he collides with wall and bounces of, he is faced into right direction

I hope you get what i mean :)
Thank you very much

Comments

  • zapposhzapposh Member Posts: 65
    Set up a rule:
    When actor motion X < 0, use picture of actor facing left.
    Otherwise, when actor motion X > or equals 0, use the change image attribute to make him face right.
  • Mile1Mile1 Member Posts: 10
    thank you very much :)
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Sounds like you have your solution. Thought I would add one thing that could be useful in the future. If you have a top down game you can use this:

    constrain self.rotation to vectorToangle(self.linear.motionX , self.linear.motion.Y) and it will always face the exact direction it is going.
Sign In or Register to comment.