From c2771bc8abf2024779d31afd998bf7f0b797b783 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 17 Dec 2014 02:15:40 +0100 Subject: [PATCH] Head tracking fix --- apps/openmw/mwrender/npcanimation.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 7c68a4538..3b0b4e08b 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -626,10 +626,7 @@ Ogre::Vector3 NpcAnimation::runAnimation(float timepassed) Ogre::Node* node = baseinst->getBone("Bip01 Head"); if (node) - { - node->rotate(Ogre::Vector3::UNIT_Z, mHeadYaw, Ogre::Node::TS_WORLD); - node->rotate(Ogre::Vector3::UNIT_X, mHeadPitch, Ogre::Node::TS_WORLD); - } + node->rotate(Ogre::Quaternion(mHeadYaw, Ogre::Vector3::UNIT_Z) * Ogre::Quaternion(mHeadPitch, Ogre::Vector3::UNIT_X), Ogre::Node::TS_WORLD); } mFirstPersonOffset = 0.f; // reset the X, Y, Z offset for the next frame.