From d3d5c1fd1546ae3d4731453c920d74d9fda2eabb Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 29 Nov 2014 16:51:45 +0100 Subject: [PATCH] Disable debug drawing for raycasting shapes This reduces performance too much, and seeing both shapes overlaid on top of each other is confusing anyway. This can be reintroduced via a setting if necessary. --- libs/openengine/bullet/physic.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/openengine/bullet/physic.cpp b/libs/openengine/bullet/physic.cpp index d7db81595..0b08e28d9 100644 --- a/libs/openengine/bullet/physic.cpp +++ b/libs/openengine/bullet/physic.cpp @@ -514,6 +514,7 @@ namespace Physic assert (mRaycastingObjectMap.find(name) == mRaycastingObjectMap.end()); mRaycastingObjectMap[name] = body; mDynamicsWorld->addRigidBody(body,CollisionType_Raycasting,CollisionType_Raycasting|CollisionType_Projectile); + body->setCollisionFlags(body->getCollisionFlags() | btCollisionObject::CF_DISABLE_VISUALIZE_OBJECT); } return body;