3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-27 00:15:32 +02:00

Reset detailed motion states when the workload zone changes

This commit is contained in:
luiscuenca 2019-06-13 09:05:55 -07:00
parent 50cfe4531e
commit 20b17291b4

View file

@ -490,7 +490,7 @@ void AvatarManager::buildPhysicsTransaction(PhysicsEngine::Transaction& transact
_myAvatar->getCharacterController()->buildPhysicsTransaction(transaction);
for (auto avatar : _otherAvatarsToChangeInPhysics) {
bool isInPhysics = avatar->isInPhysicsSimulation();
if (isInPhysics != avatar->shouldBeInPhysicsSimulation()) {
if (isInPhysics != avatar->shouldBeInPhysicsSimulation() || avatar->_needsReinsertion) {
if (isInPhysics) {
transaction.objectsToRemove.push_back(avatar->_motionState);
avatar->_motionState = nullptr;