forked from bartvdbraak/blender
bge track-to actuator: reverse the order of the cross product rather then negating.
This commit is contained in:
parent
1e5ea3e5c4
commit
06dd4fa40c
@ -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],
|
||||
|
Loading…
Reference in New Issue
Block a user