From 5e906ad45b0fce049a97716f7e59f74138ad5807 Mon Sep 17 00:00:00 2001 From: Chris Genova Date: Thu, 7 Sep 2017 19:37:43 -0700 Subject: [PATCH] Fixing gb_mat4_look_at --- gb_math.h | 6 +++--- 1 file 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); }