Rotate to position counterclockwise

Hi Chefs!

According to the cookbook, you should be able to rotate your actor clockwise or counterclockwise to a specific coordinate. By default it seems to go clockwise. Cool, but how do I make my actor turn counterclockwise?
It's gotta be something simple I'm missing?

Thanks!

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Use a negative direction I believe.

  • aurynstaraurynstar Member Posts: 41

    Thanks for the reply @jamie_c .
    Only I want the actor A to rotate towards actor B. Actor is always moving so Actor B's x and y position are always changing. When Actor A is to the right of Actor B, it should rotate counterclockwise and clockwise when it on the left.
    So I'm not sure if I should be adjusting my x and y coordinates?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    You could have two rules based on the vectorToAngle between the two actors.

  • aurynstaraurynstar Member Posts: 41

    Thanks @tatiang !

    It worked!

Sign In or Register to comment.