From 06dd4fa40c104b02b20050389d8a8c64d87062aa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 13 Jan 2013 03:48:48 +0000 Subject: [PATCH] bge track-to actuator: reverse the order of the cross product rather then negating. --- source/gameengine/Ketsji/KX_TrackToActuator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/gameengine/Ketsji/KX_TrackToActuator.cpp b/source/gameengine/Ketsji/KX_TrackToActuator.cpp index be2b40316e8..44a6e2fd7ee 100644 --- a/source/gameengine/Ketsji/KX_TrackToActuator.cpp +++ b/source/gameengine/Ketsji/KX_TrackToActuator.cpp @@ -294,7 +294,7 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) { // (1.0 , 0.0 , 0.0 ) x direction is forward, z (0.0 , 0.0 , 1.0 ) up left = dir.safe_normalized(); - dir = -(left.cross(up)).safe_normalized(); + dir = up.cross(left).safe_normalized(); mat.setValue ( left[0], dir[0],up[0], left[1], dir[1],up[1], @@ -334,7 +334,7 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) { // (1.0 , 0.0 , 0.0 ) x direction is forward, z (0.0 , 0.0 , 1.0 ) up left = -dir.safe_normalized(); - dir = -(left.cross(up)).safe_normalized(); + dir = up.cross(left).safe_normalized(); mat.setValue ( left[0], dir[0],up[0], left[1], dir[1],up[1], @@ -373,7 +373,7 @@ bool KX_TrackToActuator::Update(double curtime, bool frame) { // (1.0 , 0.0 , 0.0 ) -x direction is forward, z (0.0 , 0.0 , 1.0 ) up left = -dir.safe_normalized(); - dir = -(left.cross(up)).safe_normalized(); + dir = up.cross(left).safe_normalized(); mat.setValue ( left[0], dir[0],up[0], left[1], dir[1],up[1],