diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-13 07:48:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-13 07:48:48 +0400 |
commit | 06dd4fa40c104b02b20050389d8a8c64d87062aa (patch) | |
tree | 2d0ac7aced825e7b8f64446fd01e238601a2dddf | |
parent | 1e5ea3e5c43f8cb4d890a7e1e2c1283f33b6a057 (diff) |
bge track-to actuator: reverse the order of the cross product rather then negating.
-rw-r--r-- | source/gameengine/Ketsji/KX_TrackToActuator.cpp | 6 |
1 files 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], |