WireBoundingBox not showing

Thrakbad

14-06-2009 12:34:28

Hello,
I'm trying to show a WireBoundingBox with a custom size at a certain position. But the box just won't show up and I'm running out of ideas what could be wrong. Here's the code for the box creation.
wireBoundingBox = ogre.WireBoundingBox();
axisAlignedBox = ogre.AxisAlignedBox(ogre.Vector3(-100.0, -100.0, -100.0), ogre.Vector3(100.0, 100.0, 100.0))
wireBoundingBox.setupBoundingBox(axisAlignedBox);
wireBoundingBox.setVisible(True);
self.sceneManager.injectMovableObject(wireBoundingBox) #tried that after it didn't work without it
node = self.sceneManager.getRootSceneNode().createChildSceneNode()
node.attachObject(wireBoundingBox);
node.setPosition(1000.0, 1000.0, 1000.0)

Any help is greatly appreciated.

dermont

16-06-2009 23:59:05

Your need to keep a reference to your BoundingBox, e.g:


#node.setPosition(1000.0, 1000.0, 1000.0)
self.wireBoundingBox = wireBoundingBox

def __del__(self):
self.sceneManager.detachObject(self.wireBoundingBox)
del self.wireBoundingBox
sf.Application.__del__(self)