mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 05:50:31 +00:00
Adds a debug visualization mode for the active physics world.
Allows you to see the active collision info for the physics engine.
This commit is contained in:
parent
c7dfe3c1f8
commit
242d317a31
4 changed files with 19 additions and 0 deletions
|
|
@ -114,11 +114,13 @@ function initializeWorldEditor()
|
|||
EVisibility.addOption( "Debug Render: Decals", "$Decals::debugRender", "" );
|
||||
EVisibility.addOption( "Debug Render: Light Frustums", "$Light::renderLightFrustums", "" );
|
||||
EVisibility.addOption( "Debug Render: Bounding Boxes", "$Scene::renderBoundingBoxes", "" );
|
||||
EVisibility.addOption( "Debug Render: Physics World", "$PhysicsWorld::render", "togglePhysicsDebugViz" );
|
||||
EVisibility.addOption( "AL: Disable Shadows", "$Shadows::disable", "" );
|
||||
EVisibility.addOption( "AL: Light Color Viz", "$AL_LightColorVisualizeVar", "toggleLightColorViz" );
|
||||
EVisibility.addOption( "AL: Light Specular Viz", "$AL_LightSpecularVisualizeVar", "toggleLightSpecularViz" );
|
||||
EVisibility.addOption( "AL: Normals Viz", "$AL_NormalsVisualizeVar", "toggleNormalsViz" );
|
||||
EVisibility.addOption( "AL: Depth Viz", "$AL_DepthVisualizeVar", "toggleDepthViz" );
|
||||
EVisibility.addOption( "AL: Glow Buffer", "$AL_GlowVisualizeVar", "toggleGlowViz" );
|
||||
EVisibility.addOption( "AL: PSSM Cascade Viz", "$AL::PSSMDebugRender", "" );
|
||||
EVisibility.addOption( "Frustum Lock", "$Scene::lockCull", "" );
|
||||
EVisibility.addOption( "Disable Zone Culling", "$Scene::disableZoneCulling", "" );
|
||||
|
|
|
|||
|
|
@ -191,3 +191,11 @@ function EVisibility::addClassOptions( %this )
|
|||
%selList.addGuiControl( %selCheckBox );
|
||||
}
|
||||
}
|
||||
|
||||
function togglePhysicsDebugViz( %enable )
|
||||
{
|
||||
if(physicsPluginPresent())
|
||||
{
|
||||
physicsDebugDraw(%enable);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ function initializeWorldEditor()
|
|||
EVisibility.addOption( "Debug Render: Decals", "$Decals::debugRender", "" );
|
||||
EVisibility.addOption( "Debug Render: Light Frustums", "$Light::renderLightFrustums", "" );
|
||||
EVisibility.addOption( "Debug Render: Bounding Boxes", "$Scene::renderBoundingBoxes", "" );
|
||||
EVisibility.addOption( "Debug Render: Physics World", "$PhysicsWorld::render", "togglePhysicsDebugViz" );
|
||||
EVisibility.addOption( "AL: Disable Shadows", "$Shadows::disable", "" );
|
||||
EVisibility.addOption( "AL: Light Color Viz", "$AL_LightColorVisualizeVar", "toggleLightColorViz" );
|
||||
EVisibility.addOption( "AL: Light Specular Viz", "$AL_LightSpecularVisualizeVar", "toggleLightSpecularViz" );
|
||||
|
|
|
|||
|
|
@ -191,3 +191,11 @@ function EVisibility::addClassOptions( %this )
|
|||
%selList.addGuiControl( %selCheckBox );
|
||||
}
|
||||
}
|
||||
|
||||
function togglePhysicsDebugViz( %enable )
|
||||
{
|
||||
if(physicsPluginPresent())
|
||||
{
|
||||
physicsDebugDraw(%enable);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue