Not sure if this is relevant or helpful, but what I usually do is calculate the
amount of overlap between the rectangles in all directions. The direction with
the least overlap is the one you should pop-back.
Chris.
On Sun, Jun 07, 2009 at 09:09:43AM -0500, pymike wrote:
On Sun, Jun 7, 2009 at
On Sun, Jun 7, 2009 at 1:24 AM, Skizzaltix waterfli...@speakeasy.netwrote:
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
Hello,
I've been trying to find a way to, when detecting collisions between two
sprites, determine which side of one sprite is colliding with the other.
Basically, I want to make it so that when a character walking to the
left collides with a block to his/her left, he/she stops moving, but if
Hi, I wrote a tutorial on this:
http://pymike.pynguins.com/?page=tutorialsid=1
HTH
On Sat, Jun 6, 2009 at 1:33 PM, Skizzaltix waterfli...@speakeasy.netwrote:
Hello,
I've been trying to find a way to, when detecting collisions between two
sprites, determine which side of one sprite is
This works perfectly if the character is moving along only one axis, but
if he/she is moving diagonally along a row of walls, both the colliding
from the side and the colliding from the top if statements get
triggered, and so the character ceases movement along both axes...
Thanks for the help,
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
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