normalize vector

This commit is contained in:
luiscuenca 2018-05-16 10:17:38 -07:00
parent 4b09f1dc30
commit 7b48dc2370

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, transformVectorFull(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");