[ODE] Python wrapper and collisions
Matthias Baas
baas at ira.uka.de
Thu Aug 28 06:36:01 2003
[I've also written a reply to his private mail, but post a short answer
here as well in case other people have the same problem]
At 17:50 27.08.2003 -0500, Nolan J. Darilek wrote:
>determine how they're fairing after being knocked around a bit. Once I
>have a contactgroup JointGroup, however, what can I do with it? It's
>been years since I've written python, and I'm still in a ruby
>mindset. I've tried:
>
>for x in contactgroup:
>
>but that didn't work.
Iterating over a contact group is currently not implemented as its main
purpose is to easily remove all contact joints.
The contact information can be retrieved via the Contact objects instead
that are used to create the contact joints in the first place. Calling
contact.getContactGeomParams() returns a tuple (position, normal, depth,
geom1, geom2) which describes the contact geometry. Once you have the geom
objects you can retrieve the corresponding body (if there is one) and from
there to any other object (like game objects) you have attached to the body.
- Matthias -