try another way of fixing held object snagging at slow velocity

This commit is contained in:
Seth Alves 2015-10-19 09:56:51 -07:00
parent 742e48b0c8
commit fbe3cb9511

View file

@ -256,6 +256,10 @@ bool EntityMotionState::remoteSimulationOutOfSync(uint32_t simulationStep) {
_serverPosition = bulletToGLM(xform.getOrigin());
_serverRotation = bulletToGLM(xform.getRotation());
_serverVelocity = getBodyLinearVelocity();
if (glm::length2(_serverVelocity) < MIN_LINEAR_SPEED_SQUARED) {
_serverVelocity *= 0.0f;
}
_serverAngularVelocity = bulletToGLM(_body->getAngularVelocity());
_lastStep = simulationStep;
_serverActionData = _entity->getActionData();