mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:43:31 +02:00
add comment for simple noise filter
This commit is contained in:
parent
4e1c1aec0a
commit
a443cd65f4
1 changed files with 1 additions and 0 deletions
|
@ -476,6 +476,7 @@ void CharacterController::setFollowParameters(const glm::mat4& desiredWorldBodyM
|
||||||
_followVelocity = newFollowVelocity;
|
_followVelocity = newFollowVelocity;
|
||||||
_rigidBody->setLinearVelocity(_followVelocity);
|
_rigidBody->setLinearVelocity(_followVelocity);
|
||||||
} else {
|
} else {
|
||||||
|
// use simple blending to filter noise from the velocity measurement
|
||||||
const float blend = 0.2f;
|
const float blend = 0.2f;
|
||||||
_followVelocity = (1.0f - blend) * _followVelocity + blend * newFollowVelocity;
|
_followVelocity = (1.0f - blend) * _followVelocity + blend * newFollowVelocity;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue