Pygame surface rotation, rect rotation or sprite rotation?
        Posted  
        
            by 
                Alan
            
        on Game Development
        
        See other posts from Game Development
        
            or by Alan
        
        
        
        Published on 2012-11-29T12:46:47Z
        Indexed on 
            2012/11/29
            17:20 UTC
        
        
        Read the original article
        Hit count: 888
        
i seem to have a conceptual misunderstanding of the surface and rect object in pygame.
I currently observe these objects this way:
Surface
- Just the loaded image
 
rect
- the 'hard' representation of the ingame object (sprite). Used for simplifying object moment and collision detection
 
sprite
- rect and surface grouped together
 
What i want to do is rotate my sprite. The only available method i found for rotation is pygame.transform.rotate.
How do i rotate the rectangle, or even better, the whole sprite?
Below is the image of how i visualize this problem.

© Game Development or respective owner