More compiley.

This commit is contained in:
Andrzej Kapolka 2013-06-06 15:44:38 -07:00
parent ba6f2307ba
commit a7c265d017

View file

@ -266,7 +266,7 @@ void SerialInterface::readData(float deltaTime) {
// Without a compass heading, always decay estimated Yaw slightly
const float YAW_DECAY = 0.995;
glm::vec3 forward = estimatedRotation * glm::vec3(0.0f, 0.0f, -1.0f);
esimatedRotation = safeMix(glm::angleAxis(glm::degrees(atan2f(forward.x, -forward.z)),
estimatedRotation = safeMix(glm::angleAxis(glm::degrees(atan2f(forward.x, -forward.z)),
glm::vec3(0.0f, 1.0f, 0.0f)) * estimatedRotation, estimatedRotation, YAW_DECAY);
}
}