ODE Middleware

Hi, and thank you for such a detailed reply!
Sorry about forgetting to post a snippet, I was tired… annd… well yes :smiley:

I tired as you suggested however still no go, so here is my cube.py file, and I just plugged it into main.py (included with your example) by the following code:

box = loader.loadModel("box")  #load model
box.reparentTo(render)         #reparent to render
box.setPos(0, -7, 3)           #set pos because I changed map
cube(self.worldManager, box)   #make a cube (see cube.py)

that’s how its being called. and for the class:

class cube():
	def __init__(self, worldManager, model):
		self.worldManager = worldManager
		self.cubeNP = model

		self.cubemesh = OdeTriMeshData(self.cubeNP, True)	
		self.cubeGeom = OdeTriMeshGeom(self.worldManager.space, self.cubemesh)
		#self.cubeGeom = OdeBoxGeom(self.worldManager.space, 1, 1, 1)
		self.cubeGeom.setPosition(self.cubeNP.getPos(render))
		self.cubeGeom.setQuaternion(self.cubeNP.getQuat(render))

		self.cubeData = odeGeomData()
		self.cubeData.name = "cube"

		self.worldManager.setGeomData(self.cubeGeom, self.cubeData, self.cubeNP)

I’m still lookin’ to see where I’ve went wrong… :wink:

Thanks!

EDIT: fixed cube class (I forgot to change it back to TRI mesh)