mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +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,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