danoli3
27-09-2009 11:53:02
Hey,
Anyone know a way to toggle the VisualDebugger on and off.
I currently tried doing this:
.header
init:
Update:
At the moment, if you press F3 it changes isPhysVisDebug bool to the oppisite of what it is. So on or off.
This actually works however the 3d environment still has all of the 'lines' created by the VisualDebugger just doesnt update.
How or is it possible to toggle it off and have no artifacts of the un-updated draw?
Thanks in advance
-Danoli3
Anyone know a way to toggle the VisualDebugger on and off.
I currently tried doing this:
.header
// NxOgre Visual Debugger variables
NxOgre::VisualDebugger* pPhysVisDebug;
OGRE3DRenderable* pPhysVisDebugRenderable;
Ogre::SceneNode* pPhysVisDebugNode;
init:
//Init the VisualDebugger
pPhysVisDebug = pPhysWorld->getVisualDebugger();
pPhysVisDebugRenderable = new OGRE3DRenderable( NxOgre::Enums::RenderableType_VisualDebugger );
pPhysVisDebug->setRenderable( pPhysVisDebugRenderable );
pPhysVisDebugNode = sceneMgr->getRootSceneNode()->createChildSceneNode();
pPhysVisDebugNode->attachObject( pPhysVisDebugRenderable );
pPhysVisDebug->setVisualisationMode( NxOgre::Enums::VisualDebugger_ShowAll ); Update:
// turn on visual debugger
if(isPhysVisDebug == true)
{
pPhysVisDebug->draw();
pPhysVisDebugNode->needUpdate();
}At the moment, if you press F3 it changes isPhysVisDebug bool to the oppisite of what it is. So on or off.
This actually works however the 3d environment still has all of the 'lines' created by the VisualDebugger just doesnt update.
How or is it possible to toggle it off and have no artifacts of the un-updated draw?
Thanks in advance
-Danoli3