zero velocity of deactivated dynamic entities
Showing the changes to interface/src/Application.cpp (1 of 12 files). Show all
Unified · Split
| @@ -4438,9 +4438,12 @@ void Application::update(float deltaTime) { · 4437 unmodified lines | ||
| 4438 | 4438 | |
| 4439 | 4439 | getEntities()->getTree()->withWriteLock([&] { |
| 4440 | 4440 | PerformanceTimer perfTimer("handleOutgoingChanges"); |
| 4441 | − const VectorOfMotionStates& outgoingChanges = _physicsEngine->getOutgoingChanges(); | |
| 4442 | − _entitySimulation->handleOutgoingChanges(outgoingChanges); | |
| 4443 | − avatarManager->handleOutgoingChanges(outgoingChanges); | |
| 4441 | + const VectorOfMotionStates& deactivations = _physicsEngine->getDeactivatedMotionStates(); | |
| 4442 | + _entitySimulation->handleDeactivatedMotionStates(deactivations); | |
| 4443 | + | |
| 4444 | + const VectorOfMotionStates& outgoingChanges = _physicsEngine->getChangedMotionStates(); | |
| 4445 | + _entitySimulation->handleChangedMotionStates(outgoingChanges); | |
| 4446 | + avatarManager->handleChangedMotionStates(outgoingChanges); | |
| 4444 | 4447 | }); |
| 4445 | 4448 | |
| 4446 | 4449 | if (!_aboutToQuit) { |