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.

PyODE and PyOgre playing nicely

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: , , , , ,

Comments

  1. Jason
    January 5th, 2006 | 14:32

    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! :)

  2. January 18th, 2006 | 15:02

    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

  3. Zhao
    February 17th, 2006 | 22:21

    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!

  4. March 8th, 2006 | 11:03

    I agree with the previous posters, show some source!

  5. March 8th, 2006 | 21:01

    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 ;).

  6. Ryan
    March 8th, 2006 | 21:38

    I, too, am very interested in the source. I was just working on the same thing. :)

  7. March 21st, 2006 | 13:18

Leave a reply