Showing the changes to libraries/physics/src/EntityMotionState.cpp (1 of 2 files). Show all
Unified · Split
| @@ -245,7 +245,7 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) { · 244 unmodified lines | ||
| 245 | 245 | |
| 246 | 246 | float dx2 = glm::distance2(position, _serverPosition); |
| 247 | 247 | |
| 248 | − const float MAX_POSITION_ERROR_SQUARED = 0.001f; // 0.001 m^2 ~~> 0.03 m | |
| 248 | + const float MAX_POSITION_ERROR_SQUARED = 0.000004f; // Sqrt() - corresponds to 2 millimeters | |
| 249 | 249 | if (dx2 > MAX_POSITION_ERROR_SQUARED) { |
| 250 | 250 | |
| 251 | 251 | #ifdef WANT_DEBUG |
| @@ -270,7 +270,7 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) { · 18 unmodified lines | ||
| 270 | 270 | _serverRotation = glm::normalize(computeBulletRotationStep(_serverAngularVelocity, PHYSICS_ENGINE_FIXED_SUBSTEP) * _serverRotation); |
| 271 | 271 | } |
| 272 | 272 | } |
| 273 | − const float MIN_ROTATION_DOT = 0.99f; // 0.99 dot threshold coresponds to about 16 degrees of slop | |
| 273 | + const float MIN_ROTATION_DOT = 0.99999f; // This corresponds to about 0.5 degrees of rotation | |
| 274 | 274 | glm::quat actualRotation = bulletToGLM(worldTrans.getRotation()); |
| 275 | 275 | |
| 276 | 276 | #ifdef WANT_DEBUG |