aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Genova 2017-09-07 19:37:43 -0700
committerGravatar Chris Genova 2017-09-07 19:37:43 -0700
commit5e906ad45b0fce049a97716f7e59f74138ad5807 (patch)
treedc2b0ad2040332a84c04db8f31d31dccefc5f84d
parentMerge branch 'master' of https://github.com/gingerBill/gb (diff)
Fixing gb_mat4_look_at
-rw-r--r--gb_math.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gb_math.h b/gb_math.h
index 62f84f4..ffd8d84 100644
--- a/gb_math.h
+++ b/gb_math.h
@@ -1731,9 +1731,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);
}