(Yup, me again)
So, sprite X is rotating. It can rotate clock and counter-clockwise. I am trying to figure out how can the engine detect that rotation and perhaps also detect in which side its rotating.
On example:
Lets say a spaceship is flying. now he rotates. When he rotates i want him to "lean" in left or right side. This is achieved by changing the animation for a moment.
The problem is - i am trying very hard and i cant find a method to trace the rotation or its direction. Same for tracing if the angle is increasing or decreasing or even if its changing in general.
I though that i could perhaps use PV and set it to angle. Then with events monitor if the PV is going up or down and attach this as a condition for the animation change but theres also no "increasing"/"Deacresing" condition for PV neither.
I am playing in my mind with an idea to create a "phantom" sprite attached on top of the original, with rotation behaviour but with faster rotation speed.
So lets say the Main Sprite angle is 180 and Phantom Sprite angle is 180. Now the Phantom sprite is turning right so his angle increases. In first secund the angle of Phantom is now, lets say, 250. When Main angle is still around 180. Both are turning but the angle of Phantom is higher then the angle of Main.
This is when i can make it a triger. So:
If system value compare Main.Angle lower then Phantom.Angle then -> change animation to "lean right"
If system value compare Main.Angle greater then Phantom.Angle then -> change animation to "lean left"
But i havent tested this yet. Its just an idea. Maybe not that complex but also far from elegent and simple (if it works that is).
Also this preety much doubles each and every moveable-rotatating sprites in the game. needlessly. So if theres a huge battle going on and theres 50 enemies. Each made out of 3 linkes to each other animated sprites + 50 extra Phantom sprites... well, you got the idea. messy.