rotate() function?

rotate() function

If I use the following code I get the sprite turned 160 degrees in the position of 0, 0:

sprite("Space Art:Eclipse")

but if I give positioning I can’t see the sprite at all. Is this a glitch?

sprite("Space Art:Eclipse", WIDTH/2, HEIGHT/2)

If something doesn’t do what you want it to, it means you’ve discovered a glitch!

Just kidding :). Rotate affects all future draw calls, so you’re now positioning the sprite off the left hand edge of the screen. Unless you are actually wanting to rotate the entire game world, positioning should come before rotation:

sprite(mysprite) --at 0,0 because we've translated to the new position
popmatrix() --go back to where we were before rotate/translate, else rotations translations will accumulate