[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Rotation of image
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Rotation of image
- From: Tom Wardill <tom@xxxxxxxxxxxxx>
- Date: Sat, 08 Apr 2006 17:36:07 +0100
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Sat, 08 Apr 2006 12:36:21 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:to:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding:sender; b=GPQg3nu9A7tK3sXK+W6QXXQQLx43hOURF2P7sTMgsGo98MD6ykq4RgOFmmEzIUd3fro7BL79rPAGQW2yCdPmc3iw46vHUvpK8UGEA0FbFBktTjJfv24OH7++/LYXb5KaKB+5KXFr0KhkIqhfrz2M0GBoZYi7V+UCG7+v0f/MQWg=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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