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

Re: [pygame] Rotating Images on a specified axis.



Farai Aschwanden wrote:
How about using: pygame.transform.rotozoom(Surface, angle, scale): return Surface

The angle can be positive or negative, depending if you want to move the turret clock- or anti-clockwise. I assume the tank is a different sprite than the turret. Dunno, if 0 or 1 for scale will not make it zoom. But thats probably the funtion you are looking for. ;)

Just my 2 cents
Farai



Am 27.12.2006 um 23:38 schrieb Caleb Mahase:

I'm trying to make an overhead tank battle game. The biggest problem I'm running into is rotating the turret over the tank chassis. In order to do so, I need to be able to specify the axis on which the turret image will rotate instead of just rotating around the middle. The PysGear library seems to have solved this problem however I would like to avoid using an entire library to solve one problem. Any info on this issue will be greatly appreciated.

-Cal

I am already using the rotate function. From what I understand, rotozoom distorts the image.