Physics with PyODE
My idea for implimenting non-physics physics into my little game framework didn’t work out too well, so I gave in and took a look around for options.
It seems only ODE is available to Python, via PyODE. Not many [open source] physics engines seem to have Python bindings, which I find rather odd.
As it turns out, it isn’t actually all that of a mission to get ODE and Ogre working together, and the results I’ve got so far are quite acceptable. I can spawn loads of cubes (of varying sizes) and throw them around the scene and they bounce and jump around in a suitable fasion.
I haven’t tried with balls or polygon-accurate stuff yet, that’s next on the to-do list. I also intend writing a short how-to for PyODE and PyOgre integration at some point, as I was a little confused to start with, not knowing quite where or how to begin, and there is no PyODE/PyOgre example code floating around to reference.
EDIT: Example using PyODE and PyOgre now available - http://shrimpworks.za.net/2006/03/21/pyode-physics-in-pyogre-example/
Technorati Tags: Physics, Ogre, PyOgre, ODE, PyODE, Python
You should write that example/tutorial for getting pyODE and pyOgre to play together. There are plenty of folks (like me) who would appreciate it!
Would it be possible to post your code to this example on your site, if that’s OK. I’m in a similar position of trying to get pyode and pyogre to work together, but I get an issue of cubes penetrating about half way through the ground plane and boxes spinning like mad?
Thanks, Dave
I’m dying to know how to do this as well. Even if you just post your raw source code, it would be extremely useful!
I agree with the previous posters, show some source!
Right-o, I’ll just neaten up what I have, and show that :). I was hoping to do a bit more, like something generic that you could just plop into a project and have physics. Unfortunately time is always the deciding factor though ;).
I, too, am very interested in the source. I was just working on the same thing.
Example code finally available: http://shrimpworks.za.net/2006/03/21/pyode-physics-in-pyogre-example/