demo collision code broken ( wrapper problem? )

nickak2003

11-06-2013 08:36:16


self.CollisionWorld.performDiscreteCollisionDetection()
numManifolds = self.CollisionWorld.getDispatcher().getNumManifolds()
for i in range(numManifolds):
contactManifold = dispatcher.getManifoldByIndexInternal(i)
obA = contactManifold.getBody0()
obB = contactManifold.getBody1()

numContacts = contactManifold.getNumContacts()
for j in range(numContacts):
pt = contactManifold.getContactPoint(j)

the code, contactManifold.getBody0() generates an error, No to_python (by-value) converter found for C++ type: void const *. Is this a problem with the wrapper?

dermont

11-06-2013 09:27:03

Not sure what version of python-ogre / bullet you are using. Maybe you could tell us.

Try getBodyAsObject0 it casts a body to a btCollisionObject.

nickak2003

11-06-2013 09:41:56

ogre-1.7.2-r1131M-py-2.7.7z, bullet-1.7.2-r1131M-py-2.7.7z

nickak2003

11-06-2013 09:46:02

getBodyAsObject0 works great!