unlock after character is properly updated

This commit is contained in:
Andrew Meadows 2015-03-30 16:07:56 -07:00
parent 9b13f186e3
commit c6b34df06c

View file

@ -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;
}
}
}