How to stop facing the initial direction after movement?

LordTarantorLordTarantor Member, PRO Posts: 890
edited November -1 in Working with GS (Mac)
Hello everybody:
I am using the CodeMonkey Joystick demo and it works great but when I release the stick, the player goes back to face the same direction it started. How can I make the player keep looking the same way it was looking when the stick was released.
Thanks

Comments

  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    In the actor controlled by the stick go to the rule constraining the actor to the Angle set by the stick and wrap it in a rule:

    When Attribute
    StickGrabbed = true
    ---Constrain attribute "self.rotation" to "game.Angle"
    otherwise
    ---Change attribute "self.rotation" to "game.Angle"
    ---Change attribute "self.Motion.Angular Velocity" to "0"

    Another method is to delete some change attributes in one of the stick rules but it never worked for me.
  • LordTarantorLordTarantor Member, PRO Posts: 890
    Mark... Awesome... Thanks a lot.
Sign In or Register to comment.