Hello everyone.
First of all, I wanted to let you know that I'm almost done with my game called Squares! I just need to add my main menu, improve iPad support, and work on powerups. Hopefully this will be the last time that I need help before releasing it!
So here is my question...
I would like to implement a powerup that you need to rotate 360° clockwise to activate. I am having some trouble writing the code for this as the rotation of an SPDisplayObject goes up to 180 and then starts reporting negative numbers. Also, I need to make sure that there are no cheats to activate it.
Can someone suggest a way to go about this?
The Last 10% / Rotation question
(2 posts) (1 voice)-
Posted 1 year ago #
-
YAY!
Shilo just helped me out with it.float rotation; if (SP_R2D(obj.rotation) < 0) { rotation = SP_R2D(obj.rotation)+360; } else { rotation = SP_R2D(obj.rotation); }
Posted 1 year ago #
Reply
You must log in to post.