Showing the changes to libraries/physics/src/EntityMotionState.cpp (1 of 1 file). Show all
Unified · Split
| @@ -256,6 +256,10 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) { · 255 unmodified lines | |||
| 256 | _serverPosition = bulletToGLM(xform.getOrigin()); | 256 | _serverPosition = bulletToGLM(xform.getOrigin()); |
| 257 | _serverRotation = bulletToGLM(xform.getRotation()); | 257 | _serverRotation = bulletToGLM(xform.getRotation()); |
| 258 | _serverVelocity = getBodyLinearVelocity(); | 258 | _serverVelocity = getBodyLinearVelocity(); |
| 259 | if (glm::length2(_serverVelocity) < MIN_LINEAR_SPEED_SQUARED) { | ||
| 260 | _serverVelocity *= 0.0f; | ||
| 261 | } | ||
| 262 | |||
| 259 | _serverAngularVelocity = bulletToGLM(_body->getAngularVelocity()); | 263 | _serverAngularVelocity = bulletToGLM(_body->getAngularVelocity()); |
| 260 | _lastStep = simulationStep; | 264 | _lastStep = simulationStep; |
| 261 | _serverActionData = _entity->getActionData(); | 265 | _serverActionData = _entity->getActionData(); |