diff options
author | Erwin Coumans <blender@erwincoumans.com> | 2006-12-20 09:43:43 +0300 |
---|---|---|
committer | Erwin Coumans <blender@erwincoumans.com> | 2006-12-20 09:43:43 +0300 |
commit | 1852d1a410c23e5be7792ac810b2568c930c86a1 (patch) | |
tree | 2034af773cd29d4500c7103f2b96912099805236 /source/gameengine/Converter | |
parent | 427e306196f07ed0f276de614a98cfb783c2e4d6 (diff) |
Enable 'show physics visualization' in the Game Menu. Should help to locate problems with collision detection/physics (also useful when baking, and/or using the new rigidbody constraints).
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/KX_BlenderSceneConverter.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 75c0e54eb68..44e62f1601a 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -43,6 +43,7 @@ #include "KX_KetsjiEngine.h" #include "KX_IPhysicsController.h" #include "BL_Material.h" +#include "SYS_System.h" #include "DummyPhysicsEnvironment.h" @@ -305,6 +306,11 @@ void KX_BlenderSceneConverter::ConvertScene(const STR_String& scenename, ccdPhysEnv->setDeactivationLinearTreshold(0.8f); // default, can be overridden by Python ccdPhysEnv->setDeactivationAngularTreshold(1.0f); // default, can be overridden by Python + SYS_SystemHandle syshandle = SYS_GetSystem(); /*unused*/ + int visualizePhysics = SYS_GetCommandLineInt(syshandle,"show_physics",0); + if (visualizePhysics) + ccdPhysEnv->setDebugMode(btIDebugDraw::DBG_DrawWireframe|btIDebugDraw::DBG_DrawAabb|btIDebugDraw::DBG_DrawContactPoints|btIDebugDraw::DBG_DrawText); + //todo: get a button in blender ? //disable / enable debug drawing (contact points, aabb's etc) //ccdPhysEnv->setDebugMode(1); |