From ede9a2b170be2e51998440d2e71ede7cc178b52f Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Wed, 19 Sep 2012 19:56:02 +0200 Subject: [PATCH] fixed an orientation problem --- apps/openmw/mwscript/transformationextensions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwscript/transformationextensions.cpp b/apps/openmw/mwscript/transformationextensions.cpp index 5db557174..706d8d720 100644 --- a/apps/openmw/mwscript/transformationextensions.cpp +++ b/apps/openmw/mwscript/transformationextensions.cpp @@ -442,7 +442,7 @@ namespace MWScript ESM::Position ipos = MWBase::Environment::get().getWorld()->getPlayer().getPlayer().getRefData().getPosition(); Ogre::Vector3 pos(ipos.pos[0],ipos.pos[1],ipos.pos[2]); - Ogre::Quaternion rot(Ogre::Radian(ipos.rot[2]), Ogre::Vector3::UNIT_Z); + Ogre::Quaternion rot(Ogre::Radian(-ipos.rot[2]), Ogre::Vector3::UNIT_Z); if(direction == 0) pos = pos + distance*rot.yAxis(); else if(direction == 1) pos = pos - distance*rot.yAxis(); else if(direction == 2) pos = pos - distance*rot.xAxis(); @@ -485,7 +485,7 @@ namespace MWScript ESM::Position ipos = me.getRefData().getPosition(); Ogre::Vector3 pos(ipos.pos[0],ipos.pos[1],ipos.pos[2]); - Ogre::Quaternion rot(Ogre::Radian(ipos.rot[2]), Ogre::Vector3::UNIT_Z); + Ogre::Quaternion rot(Ogre::Radian(-ipos.rot[2]), Ogre::Vector3::UNIT_Z); if(direction == 0) pos = pos + distance*rot.yAxis(); else if(direction == 1) pos = pos - distance*rot.yAxis(); else if(direction == 2) pos = pos - distance*rot.xAxis();