[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] know from where two sprites have collided



Leonardo Santagada wrote:
> I am wondering if someone has a fast algo to know from where two sprites 
> have collided. I mean know if it was from the top,left,bottom or up in a 
> collision. I am now using the los code from the repository that i have 
> modified but I don't think it is the faster way of doing it. please post 
> your ideas.

there's nothing to directly do it. if only one of the sprites is moving, 
you might be able to easily check which direction it was moving when 
they collide, and that would be the edge/corner that was hit.



____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org