more correct variable name

This commit is contained in:
Andrew Meadows 2018-05-09 12:13:27 -07:00
parent f454dac709
commit b8d34f4b8f

View file

@ -732,8 +732,8 @@ void EntityMotionState::measureBodyAcceleration() {
glm::vec3 velocity = getBodyLinearVelocityGTSigma();
const float MIN_DAMPING_FACTOR = 0.01f;
float dampingAttenuationFactor = 1.0f / glm::max(powf(1.0f - _body->getLinearDamping(), dt), MIN_DAMPING_FACTOR);
_measuredAcceleration = (velocity * dampingAttenuationFactor - _lastVelocity) * invDt;
float invDampingAttenuationFactor = 1.0f / glm::max(powf(1.0f - _body->getLinearDamping(), dt), MIN_DAMPING_FACTOR);
_measuredAcceleration = (velocity * invDampingAttenuationFactor - _lastVelocity) * invDt;
_lastVelocity = velocity;
if (numSubsteps > PHYSICS_ENGINE_MAX_NUM_SUBSTEPS) {
// we fall in here when _lastMeasureStep is old: the body has just become active