Merge pull request #13935 from hyperlogic/bug-fix/takeoff-to-in-air-glitch

Fix for glitch when entering in-air state from takeoff.
This commit is contained in:
Anthony Thibault 2018-09-05 10:56:34 -07:00 committed by GitHub
commit 536de03637
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -926,7 +926,7 @@ void Rig::computeMotionAnimationState(float deltaTime, const glm::vec3& worldPos
// compute blend based on velocity
const float JUMP_SPEED = 3.5f;
float alpha = glm::clamp(-_lastVelocity.y / JUMP_SPEED, -1.0f, 1.0f) + 1.0f;
float alpha = glm::clamp(-workingVelocity.y / JUMP_SPEED, -1.0f, 1.0f) + 1.0f;
_animVars.set("inAirAlpha", alpha);
}