[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Rect collision by direction
Thanks! It's working like charm now. Thanks, everyone!
--Skizzaltix
Brian Song wrote:
Diagonal collision detection seems to get a lot of people including
myself the first time. If you haven't fixed it yet, the remedy will
most likely require you to do 2 collision detections instead 1.
Without looking at your code, I'm gonna assume your doing collision
detection on both axis at once. What you should do instead is first
check for collision on one axis, figure out whats happening, then do a
collision detection for the other axis.