Finding Angle
Hi
I have the attributes Touch and Release. And I have that when they swipe one actor moves in the direction game.Release is. But have can I get it to roate towards where its going. I need to find the angle between Touch And release. How do I do that?
Thanks
I have the attributes Touch and Release. And I have that when they swipe one actor moves in the direction game.Release is. But have can I get it to roate towards where its going. I need to find the angle between Touch And release. How do I do that?
Thanks
Comments
This is how it works :
say you have X1, Y1 and X2 Y2
To find the angle between them you use this:
Make an attribute - angle - and call it "angel between 1 and 2" (or whatever name you want)
Then:
Change attribute "angel between 1 and 2" TO vectorToAngle(X1-X2,Y1-Y2)
Will give you the angle between them , the value can be from 0-360
Cheers
Roy.