Limit Rotation of direction (question)

how would i limit the rotation of an actor travelling in the direction of travel,as the actor is travelling upwards i want to limit his rotation to an arc,so if he does fall down then that limited rotation will keep him upward facing.

thank you

Comments

  • gamedivisiongamedivision Member Posts: 807
    Bump
  • FajlajpFajlajp Member Posts: 666
    i don't really understand what you want.
  • gamedivisiongamedivision Member Posts: 807
    If an actor if facing upward I want him to rotate in the direction of travel but be restricted to like 45deg to the left and 45 to right so when the actor falls back down he doesn't rotate toward the ground
  • WingmanappsWingmanapps Member Posts: 458
    there are several ways to do what you want.

    If self.rotation is < then 45
    rotate clockwise
    If self.rotation is > then 315
    rotate counterclockwise
    Meaning - it wont rotation if is below/above the degree value you set.

    or you could simply do a constrain MIN/MAX or self rotation
  • gamedivisiongamedivision Member Posts: 807
    Ohh thanks ill try that one out
Sign In or Register to comment.