From c6b34df06cd2a48ba70b775d5480f730b83d6b9f Mon Sep 17 00:00:00 2001 From: Andrew Meadows Date: Mon, 30 Mar 2015 16:07:56 -0700 Subject: [PATCH] unlock after character is properly updated --- libraries/physics/src/PhysicsEngine.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/physics/src/PhysicsEngine.cpp b/libraries/physics/src/PhysicsEngine.cpp index c9fdbc4857..83fad9228d 100644 --- a/libraries/physics/src/PhysicsEngine.cpp +++ b/libraries/physics/src/PhysicsEngine.cpp @@ -624,11 +624,9 @@ void PhysicsEngine::setCharacterController(CharacterController* character) { _characterController->setDynamicsWorld(NULL); _characterController = NULL; } + // the character will be added to the DynamicsWorld later + _characterController = character; unlock(); - if (character) { - // the character will be added to the DynamicsWorld later - _characterController = character; - } } }