VectorToAngel

ShanemcShanemc Member Posts: 86
edited November -1 in Working with GS (Mac)
Ok so I have fish swimming and when it hits a wall I want it to change directions and go the other way. But I cant seem to get the fish to rotate so the the head is always facing the way the fish is moving. l would like for them to face the way they are swimming. Any help would be appreciated.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    you need 2 seperate images for the left direction and right direction.

    Then have a rule when attribute self motion linear x is > 0 change image to right facing image

    then another rule when attribute self motion linear x is < 0 change image to left facing direction

    cheers
  • ShanemcShanemc Member Posts: 86
    Thanks for your help
  • RHRH Member Posts: 1,079
    If it's top down, you could constrain self.rotation to vectortoangle(self.motion.X,self.motion.Y)

    or some variation of that to get it facing the way that you wish.
Sign In or Register to comment.