posted 10 years ago
So I need to create a square and make it rotate when the letter R is pressed and then make it stop when the letter R is pressed again. I need make it rotate using a maths equation that I can't figure it out myself right this moment and would greatly appreciate any help.
Code for square:
Code to control the square with Key Events
In the Square code there is a method to write an equation to rotate it but I can't figure that part out and would appreciate if anyone can shed some light on this and help me out. Thanks in advance.