fixed twist angle bug. need to fix wrap around 180 to -180 behaviour

This commit is contained in:
amantley 2019-02-13 17:31:48 -08:00
parent c6da7cc41d
commit fc978f0ee7

View file

@ -311,8 +311,8 @@ const AnimPoseVec& AnimPoleVectorConstraint::evaluate(const AnimVariantMap& anim
trueTwist.w *= -1.0f;
}
glm::vec3 trueTwistAxis = glm::axis(trueTwist);
float trueTwistTheta = glm::angle(trueTwist);
trueTwistTheta *= glm::sign(trueTwistAxis[1]) * glm::angle(trueTwist);
float trueTwistTheta;
trueTwistTheta = glm::sign(trueTwistAxis[1]) * glm::angle(trueTwist);
_twistThetaRunningAverage = 0.5f * _twistThetaRunningAverage + 0.5f * trueTwistTheta;