[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Rotation of image



Hi all,
Really new to pygame, so apologies if this is a trivial question.
I'm trying to make a game involving a ship orbiting round a center
point.
I need the ship image to rotate so it always faces the centre.
I've tried doing:
self.image = pygame.transform.rotate(self.image, -dTheta)
(where dTheta is the angle to rotate) but this destroys the image, and
does some very strange things with the movement of the ship.

In C++, this can be easily done using a glRotate call on the draw
function. Is there any equivalent way to do this using the built in
sprite class in pygame?

Thanks for any help
--
TomW