From 358ec00256bd91f29e14620f1c898f7e9e8e8305 Mon Sep 17 00:00:00 2001 From: Benoit Bolsee Date: Mon, 1 Jun 2009 09:44:41 +0000 Subject: BGE bug fix: dynamically added sensor objects didn't have their physic shape synchronized with movement. --- source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp') diff --git a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp index 297b15a2b78..51c41c0686d 100644 --- a/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp +++ b/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp @@ -1115,15 +1115,8 @@ void KX_ConvertBulletObject( class KX_GameObject* gameobj, shapeInfo->Release(); gameobj->SetPhysicsController(physicscontroller,isbulletdyna); - if (isbulletsensor) - { - // use a different callback function for sensor object, - // bullet will not synchronize, we must do it explicitely - SG_Callbacks& callbacks = gameobj->GetSGNode()->GetCallBackFunctions(); - callbacks.m_updatefunc = KX_GameObject::SynchronizeTransformFunc; - } // don't add automatically sensor object, they are added when a collision sensor is registered - else if (objprop->m_in_active_layer) + if (!isbulletsensor && objprop->m_in_active_layer) { env->addCcdPhysicsController( physicscontroller); } -- cgit v1.2.3