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

Re: [pygame] 2D collision decection & refraction function

I was just wondering if there is a collision decection & refraction >function, for basic 2D physics, if not I am going to make one.

The very basic, of course, is Sprite:

which may or may not do all that you need in the way of detecting
collisions. Pete has written a very nice tutorial intro to sprites:

If you need more precise collision detection, there is also the
"pixel-perfect" version (Sprite Collision and Mechanics Libary):

I doubt anyone has written any very generic pygame code for
figuring out what happens to objects after you know they have
collided. There are just too many variables. Are your objects
rigid (ceramic), plastic (metal), sticky (magnetic), massive
(planets) ....

Check the Pygame Code Repository (PCR):

and the project pages:

before you go to far down the "invent your own" path.

MSN 8 with e-mail virus protection service: 3 months FREE*. http://join.msn.com/?page=features/virus&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_eliminateviruses_3mf

pygame mailing list