Right now im coding on a rocket game. The player is supposed to rotate the rocket and press space to accelerate in the chosen direction. Right now the rocket seems to randomly go into random directions. Does anybody know how i can control the rocket?
Here ist the code, interesting lines start at line 42.
I'm not sure this is the problem, since I don't know how does "going randomly" look like, but it could be that your speedRotate is too big. sin() function takes the angle in radians. 2 radians is about 115 degrees. Rotating 115 degrees 60 times every second may look random. Try something more like 0.01