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

Re: [pygame] Improved Sprites System - Call for Suggestions



On 02.06.2012 16:46, Christopher Night wrote:
On Fri, Jun 1, 2012 at 2:29 PM, DR0ID <dr0id@xxxxxxxxxx> wrote:
On 01.06.2012 15:29, Sagie Maoz wrote:
2. Setting a sprite's anchor points for handling in movement, animation, collision etc.
5. New visual attributes for sprites:
   - Rotation angle
   - Scale  
2. the sprites anchor point should be just an offset, not limited to 'topleft', 'midtop', 'topright',... and the other rect attributes

I want to be able to specify "center" or "midbottom" for the sprite anchor without knowing the image's dimensions. And I want that anchor point to remain in the appropriate place even if the image is rotated, scaled, or flipped. I'm not sure that an offset would accomplish this, but if so, then that's okay.

-Christopher

Hi

I agree, what I suggested is that both things should be possible: a general offset and/or specifying 'center' or 'midbottom' or....

I'm not sure right now how the math to maintain the point at the appropriate place. Maybe this needs some more specification for the different transformations (rotation, flip, scale).


~DR0ID