From d3bf3812a44eb3f40eadf197d091cbc2d61b0cc0 Mon Sep 17 00:00:00 2001 From: gus Date: Tue, 5 Mar 2013 20:16:57 +0000 Subject: [PATCH] changing rotation order (fix some misoriented objects) --- apps/openmw/mwrender/renderingmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwrender/renderingmanager.cpp b/apps/openmw/mwrender/renderingmanager.cpp index abc1960b8d..8bad0d17e4 100644 --- a/apps/openmw/mwrender/renderingmanager.cpp +++ b/apps/openmw/mwrender/renderingmanager.cpp @@ -278,7 +278,7 @@ bool RenderingManager::rotateObject( const MWWorld::Ptr &ptr, Ogre::Vector3 &rot Ogre::Quaternion yref(Ogre::Radian(-ptr.getRefData().getPosition().rot[1]), Ogre::Vector3::UNIT_Y); Ogre::Quaternion zref(Ogre::Radian(-ptr.getRefData().getPosition().rot[2]), Ogre::Vector3::UNIT_Z); - Ogre::Quaternion newo = adjust ? (zr * yr * xr) * (zref*yref*xref) : zr * yr * xr; + Ogre::Quaternion newo = adjust ? (xr * yr * zr) * (xref*yref*zref) : xr * yr * zr; Ogre::Radian ax,ay,az; Ogre::Matrix3 mat; newo.ToRotationMatrix(mat);