Rotate to position counterclockwise
aurynstar
Member Posts: 41
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
Use a negative direction I believe.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
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?
You could have two rules based on the vectorToAngle between the two actors.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Thanks @tatiang !
It worked!