Merge pull request #13175 from luiscuenca/fixAvatarDisappearing

Fix hips position when flying
This commit is contained in:
John Conklin II 2018-05-16 12:37:07 -07:00 committed by GitHub
commit 8d437892cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,7 @@ static AnimPose computeHipsInSensorFrame(MyAvatar* myAvatar, bool isFlying) {
// rotate the hips back to match the flying animation.
const float TILT_ANGLE = 0.523f;
const glm::quat tiltRot = glm::angleAxis(TILT_ANGLE, transformVectorFast(avatarToSensorMat, -Vectors::UNIT_X));
const glm::quat tiltRot = glm::angleAxis(TILT_ANGLE, glm::normalize(transformVectorFast(avatarToSensorMat, -Vectors::UNIT_X)));
glm::vec3 headPos;
int headIndex = myAvatar->getJointIndex("Head");