1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-04 13:33:34 +00:00

Merge pull request #343 from shakesoda/patch-3

fix mat4_lookAt translation offset
This commit is contained in:
Bjorn 2020-11-27 18:52:08 -07:00 committed by GitHub
commit c17d19d015
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -643,9 +643,9 @@ MAF mat4 mat4_lookAt(mat4 m, vec3 from, vec3 to, vec3 up) {
m[9] = z[1];
m[10] = z[2];
m[11] = 0.f;
m[12] = from[0];
m[13] = from[1];
m[14] = from[2];
m[12] = -vec3_dot(x, from);
m[13] = -vec3_dot(y, from);
m[14] = -vec3_dot(z, from);
m[15] = 1.f;
return m;
}