Not quite understanding something about ContactCallback

Terra2

08-09-2008 00:16:03

I am not understanding something about materials and ContactCallback

I set a material and a type for one body and a different one for another body and the callbacks don't call when the two hit. The physics work and they move when they hit each other, but they only call when they hit the floor and not each other.

Is this how it is supposed to work or am I doing something wrong?

For how I am setting up the materials
class Material(object):
def __init__(self,name,objectcallback):

if s.app.materialmap.has_key(name):
return s.app.materialmap[name]
World = s.app.World
sceneManager = s.app.sceneManager
self.MatDefault = World.getDefaultMaterialID()
self.MatObject = OgreNewt.MaterialID( World )
self.MatPairDefaultObject = OgreNewt.MaterialPair( World, self.MatDefault, self.MatObject )
self.ObjectCallback = objectcallback
self.MatPairDefaultObject.setContactCallback( objectcallback )
self.MatPairDefaultObject.setDefaultFriction( 1.5, 1.4 )
s.app.materialmap[name] = self

http://code.google.com/p/tesliz/source/checkout