Fix a bug in glm_lookat_lh

Fix the order of arguments passed to glm_vec3_crossn to avoid the negation of X axis.
This commit is contained in:
Michał Gallus
2022-03-08 01:29:35 +01:00
committed by GitHub
parent 2a4748d452
commit 7d47b7f1fd

View File

@@ -37,7 +37,7 @@ glm_lookat_lh(vec3 eye, vec3 center, vec3 up, mat4 dest) {
glm_vec3_sub(center, eye, f); glm_vec3_sub(center, eye, f);
glm_vec3_normalize(f); glm_vec3_normalize(f);
glm_vec3_crossn(f, up, s); glm_vec3_crossn(up, f, s);
glm_vec3_cross(s, f, u); glm_vec3_cross(s, f, u);
dest[0][0] = s[0]; dest[0][0] = s[0];