Limits to Rotation

mrpacogpmrpacogp Member Posts: 400
edited November 2012 in Working with GS (Mac)
Hi there.
I`m working on how to limit the rotation of my actor.
I got that :
vectorToAngle( game.Mouse.Position.X - self.Position.X , game.Mouse.Position.Y - self.Position.Y )

But, if you press back of my actor, you got the actor rotation nice, but how to limit the rotation only to the front?
Sometimes i got the solution posting and do another thing for a little time... maybe i have to searcho another solution..

or looking at forum hehehe
Change Attribute: self.motion.Angular Velocity To: min(1000,(self.Motion.Angular Velocity +1)*1.3)
no, this is velocity...
let me test that

Comments

  • mrpacogpmrpacogp Member Posts: 400
    edited November 2012
    finally found it


    I have to set to min(90,vectorToAngle( game.Mouse.Position.X - self.Position.X , game.Mouse.Position.Y - self.Position.Y ))

    If anyone need it..
  • mrpacogpmrpacogp Member Posts: 400
    Apologize about that.
    I have to search before to post, but sometimes my brain is stop to work :P
    There is a great community and i think all of my questions are asked before i do it..
Sign In or Register to comment.