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

Re: [pygame] PyODE

Kris Schnee wrote:
> I've been playing with PyODE today, after finding a bug of sorts in my
> Pygame game's simple physics code. So far, using Pygame as the display,
> I was able to get circles bouncing and colliding. But does anyone know
> how to feed collision information back to the program outside PyODE?
> I tried wrapping the ODE
> objects or parts of them in a new class with an "owner" field referring
> to the game object, and that didn't work.

That's pretty much what I do, except that I don't bother wrapping the
objects; every time I add a geom, I assign it an "object" attribute
which points to the game object. What about it isn't working? The only
"gotcha" I've found for wrapping ODE/Pyrex objects is that you have to
overload __new__ as well as __init__.


Attachment: signature.asc
Description: OpenPGP digital signature