mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 14:24:22 +02:00
in isMovingVsServer look at entity velocity only
This commit is contained in:
parent
ba6f6d19cc
commit
cc5f2ee451
1 changed files with 11 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue