ODE Middleware

Hi,

first of all this is a great script, thank you very much.

I have got a problem adding a Cube:

this is my code

""" 
Create a box
"""

box = loader.loadModel("box")
box.setPos(0,0,7)
box.reparentTo(render)
box.flattenLight()

	 
boxBody = OdeBody(self.worldManager.world)
M = OdeMass()
M.setBox(50000, 1, 1, 1)
boxBody.setMass(M)
boxBody.setPosition(box.getPos(render))
boxBody.setQuaternion(box.getQuat(render))
# Create a BoxGeom
boxMesh = OdeTriMeshData(box, True)    
boxGeom = OdeTriMeshGeom(self.worldManager.space, boxMesh)	
boxGeom.setCollideBits(BitMask32(0x00000122))
boxGeom.setCategoryBits(BitMask32(0x0000111))
boxGeom.setBody(boxBody)
boxData=odeGeomData()
boxData.name = "box"
boxData.isTrigger = False
boxData.surfaceFriction = 0.0

self.worldManager.setGeomData(boxGeom, boxData, box)

So there is a cobe added and it is controlled by gravity but, as it hits the ground the box goes crazy and slips on the ground, rotates and is becoming faster and faster till it slips away…

What did I do wrong =/

I also tryed a OdeBoxGeom but that isn’t effected by anything… it just shakes a bit.

Thanks in advance,
blenderkid