From 36ef95eff5ef188dcc9ece88996fb2e245730829 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Thu, 7 Aug 2008 17:29:06 +0000 Subject: BGE bug #17408 fixed: Radar sensor is oriented the wrong way when the set along negative axis. Improve reliability of Radar detection by clearing the manifold cache instead of updating it. --- .../Physics/Bullet/CcdPhysicsEnvironment.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source/gameengine/Physics') diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 0a37a461c59..dfbcf115fd7 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -966,15 +966,6 @@ void CcdPhysicsEnvironment::CallbackTriggers() { btRigidBody* rb0 = static_cast(manifold->getBody0()); btRigidBody* rb1 = static_cast(manifold->getBody1()); - // Bullet does not refresh the manifold contact point for object without contact response - // may need to remove this when a newer Bullet version is integrated - if (!dispatcher->needsResponse(rb0, rb1)) - { - manifold->refreshContactPoints(rb0->getCenterOfMassTransform(),rb1->getCenterOfMassTransform()); - numContacts = manifold->getNumContacts(); - if (!numContacts) - continue; - } if (m_debugDrawer && (m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_DrawContactPoints)) { for (int j=0;jneedsResponse(rb0, rb1)) + { + // Refresh algorithm fails sometimes when there is penetration + // (usuall the case with ghost and sensor objects) + // Let's just clear the manifold, in any case, it is recomputed on each frame. + manifold->clearManifold(); //refreshContactPoints(rb0->getCenterOfMassTransform(),rb1->getCenterOfMassTransform()); + } } } -- cgit v1.2.3