aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar gingerBill 2018-12-14 14:59:01 +0000
committerGravatar GitHub 2018-12-14 14:59:01 +0000
commit12f087bf6570a31ad3fda491bad22bcfd7322d87 (patch)
treeb31a6a012a7f106dab838cd731c4fbcd092f4688
parentAdd gb_quat_slerp interface (diff)
parentRemoving unreferenced variable (diff)
Merge pull request #26 from ravencgg/mat4_look_at_fix
mat4_look_at fix
-rw-r--r--gb_math.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gb_math.h b/gb_math.h
index f79fc83..3682b4a 100644
--- a/gb_math.h
+++ b/gb_math.h
@@ -1732,9 +1732,9 @@ void gb_mat4_look_at(gbMat4 *out, gbVec3 eye, gbVec3 centre, gbVec3 up) {
m[1][2] = -f.y;
m[2][2] = -f.z;
- m[3][0] = gb_vec3_dot(s, eye);
- m[3][1] = gb_vec3_dot(u, eye);
- m[3][2] = gb_vec3_dot(f, eye);
+ m[3][0] = -gb_vec3_dot(s, eye);
+ m[3][1] = -gb_vec3_dot(u, eye);
+ m[3][2] = +gb_vec3_dot(f, eye);
}