bharling
21-04-2007 15:06:29
hi again!
This time I'm having a little trouble with getting the treecollision to work. here's what I got:
The staticRoot is a sceneNode, with an xml scene loaded as its children. This works, but my objects just fall through the landscape. The treecollision export works as well, and produces a file.
The body object resulting from the sceneParse should be kept around shouldn't it? or am I going wrong there?

This time I'm having a little trouble with getting the treecollision to work. here's what I got:
stat_col = OgreNewt.TreeCollisionSceneParser( self.world )
stat_col.parseScene( self.staticRoot, False )
self.staticCollisionBody = OgreNewt.Body( self.world, stat_col )
self.staticCollisionBody.attachToNode( self.staticRoot )
self.staticCollisionBody.setPositionOrientation( ogre.Vector3(-5,0,-5), ogre.Quaternion.IDENTITY )
## stat_col = self.treeColParser.parseScene(self.staticRoot, False)
## stat_col.attachToNode(self.staticRoot)
self.treeColLoader.exportTreeCollision(stat_col, ky[1])
del stat_col
The staticRoot is a sceneNode, with an xml scene loaded as its children. This works, but my objects just fall through the landscape. The treecollision export works as well, and produces a file.
The body object resulting from the sceneParse should be kept around shouldn't it? or am I going wrong there?