add comment for simple noise filter

This commit is contained in:
Andrew Meadows 2016-09-28 18:08:06 -07:00
parent 4e1c1aec0a
commit a443cd65f4

View file

@ -476,6 +476,7 @@ void CharacterController::setFollowParameters(const glm::mat4& desiredWorldBodyM
_followVelocity = newFollowVelocity;
_rigidBody->setLinearVelocity(_followVelocity);
} else {
// use simple blending to filter noise from the velocity measurement
const float blend = 0.2f;
_followVelocity = (1.0f - blend) * _followVelocity + blend * newFollowVelocity;
}