I need the rectangles that spawn in my game to rotate as they move, so I made an angle variable and put
in my draw function just above the rectangle spawning for loop, then i put
Code: Select all
angle = angle + dt * math.pi/2
angle = angle % (2*math.pi)
in my update function, like the love wiki page on graphics.rotate says to do, and I got a weird result, the rectangles are now spinning as if they're orbiting something of screen, and really fast. Which isn't what I wanted at all.
How do I make it so the rectangles rotate on a center axis, and how do I make them rotate a bit slower.
I've included the .love, even though its just a main.lua right now