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

Re: [pygame] Turnable rect: collision checking



On Tuesday, Jun 10, 2003, at 18:12 America/New_York, Gerrit Holl wrote:

Gerrit Holl wrote:
To do this, I am trying to create a turnable Rect. What is the
minimum to implement for other rects being able to check whether
they collide with me? It doesn't make sense to have top, bottom,
left and right be integers because topleft != (top, left). Those
four would need to be tuples of (x, y). {top,bottom}{left,right}
don't really make sense either: should topleft mean the topmost
position or the leftmost position? More problems occur.
I am also unable to set new attributes! How am I supposed to
set the angle if I am not allowed to do so? How can I solve
this problem?
It's easy, don't try and use Rect to represent rectangles that aren't aligned to the axes of your screen. It can't do it.

-bob