From c8bb32c40d3dda4b0aaab2bff00417c1a5ac42b2 Mon Sep 17 00:00:00 2001 From: gus Date: Sat, 3 Aug 2013 12:29:18 +0200 Subject: [PATCH] small maths correction --- apps/openmw/mwworld/physicssystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/physicssystem.cpp b/apps/openmw/mwworld/physicssystem.cpp index 071321223..4ee10d872 100644 --- a/apps/openmw/mwworld/physicssystem.cpp +++ b/apps/openmw/mwworld/physicssystem.cpp @@ -328,7 +328,7 @@ namespace MWWorld Ogre::Vector3 a_ = Ogre::Vector3(a.x(),a.y(),a.z()); a_ = orient_.Inverse()*a_; Ogre::Vector2 a_xy = Ogre::Vector2(a_.x,a_.y); - Ogre::Vector2 a_yz = Ogre::Vector2(a_.y,a_.z); + Ogre::Vector2 a_yz = Ogre::Vector2(a_xy.length(),a_.z); float axy = a_xy.angleBetween(Ogre::Vector2::UNIT_Y).valueDegrees(); float az = a_yz.angleBetween(Ogre::Vector2::UNIT_X).valueDegrees(); std::cout << axy << " " << az << "\n";