Merge pull request #7347 from hyperlogic/tony/prevent-roll-in-goto-location

MyAvatar: prevent roll and pitch in avatar via snapshot url.
This commit is contained in:
Brad Hefta-Gaub 2016-03-14 18:58:49 -07:00
commit 11e88f965d

View file

@ -1787,7 +1787,7 @@ void MyAvatar::goToLocation(const glm::vec3& newPosition,
<< newOrientation.x << ", " << newOrientation.y << ", " << newOrientation.z << ", " << newOrientation.w;
// orient the user to face the target
glm::quat quatOrientation = newOrientation;
glm::quat quatOrientation = cancelOutRollAndPitch(newOrientation);
if (shouldFaceLocation) {
quatOrientation = newOrientation * glm::angleAxis(PI, glm::vec3(0.0f, 1.0f, 0.0f));