in isMovingVsServer look at entity velocity only

This commit is contained in:
Seth Alves 2015-05-06 16:26:27 -07:00
parent ba6f6d19cc
commit cc5f2ee451

View file

@ -96,9 +96,17 @@ bool EntityMotionState::isMoving() const {
}
bool EntityMotionState::isMovingVsServer() const {
auto alignmentDot = glm::abs(glm::dot(_sentRotation, _entity->getRotation()));
if (glm::distance(_sentPosition, _entity->getPosition()) > IGNORE_POSITION_DELTA ||
alignmentDot < IGNORE_ALIGNMENT_DOT) {
// auto alignmentDot = glm::abs(glm::dot(_sentRotation, _entity->getRotation()));
// if (glm::distance(_sentPosition, _entity->getPosition()) > IGNORE_POSITION_DELTA ||
// alignmentDot < IGNORE_ALIGNMENT_DOT) {
// return true;
// }
// return false;
if (glm::length(_entity->getVelocity()) > IGNORE_LINEAR_VELOCITY_DELTA) {
return true;
}
if (glm::length(_entity->getAngularVelocity()) > IGNORE_ANGULAR_VELOCITY_DELTA) {
return true;
}
return false;