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

Re: [pygame] pixel-perfect physics?



For collisions, these are some collisions from funnyboat. They support rotating and all that as long as the images contain alpha, and function the way pygame.sprite.spritecollide works http://pymike.pastebin.com/f56a18850

As for the physics collisions part, I'd like an answer to that too :-D

HTH

On Fri, Oct 24, 2008 at 3:50 PM, Michael George <mdgeorge@xxxxxxxxxxxxxx> wrote:
Has anyone had experience using pixel-perfect collision detection with a 2d physics engine?  I've looked into pymunk, but that seems to have baked-in collision detection so I don't see how to do it.  ODE has rudimentary python bindings and has separate collision detection, but it's intended for 3d and the 2d support hasn't been added to the python port yet.  There's the GSOC pygame physics project, but I don't see docs for that and can't tell if it would be suitable.

Also, as far as doing the collision detection, AFAICT there isn't a way to rotate a mask, or to do collision detection on rotated objects.  Are there plans for something like this, or am I stuck with using an image, rotating it with the transform package and then using Mask.from_surface?

Thanks.

--Mike



--
- pymike
"Stop loling into a false sense of hilarity"