Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-08 07:50:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-08 07:50:01 +0400
commit5e232548d3d3362ba5f2af7807237bc7d6b672d6 (patch)
treec13584da0ac6ab2e26ab45cebb04ffadb6aa306f /source/blender/blenlib/intern
parent28b264de67b99023e2e42b895804d8e6d88798dd (diff)
fix for error in track rotation, found while looking into adding an up axis to this function.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/math_rotation.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 4e555b02c2b..be383fdc73c 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -1542,10 +1542,10 @@ void quat_apply_track(float quat[4], short axis)
float axis[3]= {0,0,2}; axis_angle_to_quat(q, axis, -90 * (M_PI / 180)); */
/* notice x/y flipped intentionally */
- const float quat_track[][4]= {{0.70710676908493, 0.0, 0.70710676908493, 0.0}, /* pos-y */
+ const float quat_track[][4]= {{0.70710676908493, 0.0, -0.70710676908493, 0.0}, /* pos-y */
{0.70710676908493, 0.70710676908493, 0.0, 0.0}, /* pos-x */
{0.70710676908493, 0.0, 0.0, 0.70710676908493}, /* pos-z */
- {0.70710676908493, 0.0, -0.70710676908493, 0.0}, /* neg-y */
+ {0.70710676908493, 0.0, 0.70710676908493, 0.0}, /* neg-y */
{0.70710676908493, -0.70710676908493, 0.0, 0.0}, /* neg-x */
{0.70710676908493, 0.0, 0.0, -0.70710676908493}};/* neg-z */
@@ -1562,7 +1562,7 @@ void vec_apply_track(float vec[3], short axis)
case 0: /* pos-x */
/* vec[0]= 0.0; */
vec[1]= tvec[2];
- vec[2]= tvec[1];
+ vec[2]= -tvec[1];
break;
case 1: /* pos-y */
vec[0]= tvec[2];
@@ -1577,7 +1577,7 @@ void vec_apply_track(float vec[3], short axis)
case 3: /* neg-x */
/* vec[0]= 0.0; */
vec[1]= -tvec[1];
- vec[2]= tvec[2];
+ vec[2]= -tvec[2];
break;
case 4: /* neg-y */
vec[0]= -tvec[0];