Merge pull request #342 from kichikuou/camera

3d: Fix camera yaw direction and rotation order
This commit is contained in:
Nunuhara Cabbage
2026-05-19 20:41:33 -07:00
committed by GitHub
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -752,7 +752,7 @@ bool RE_plugin_get_camera_z_vector(struct RE_plugin *plugin, vec3 out)
glm_rad(plugin->camera.roll)
};
mat4 rot;
glm_euler(euler, rot);
glm_euler_yxz(euler, rot);
glm_mat4_mulv3(rot, GLM_FORWARD, 0.f, out);
return true;
}
+1 -1
View File
@@ -337,7 +337,7 @@ void RE_calc_view_matrix(struct RE_camera *camera, vec3 up, mat4 out)
glm_rad(camera->roll)
};
mat4 rot;
glm_euler(euler, rot);
glm_euler_yxz(euler, rot);
glm_mat4_mulv3(rot, front, 0.0, front);
glm_look(camera->pos, front, up, out);
}
+1 -1
View File
@@ -1082,7 +1082,7 @@ static bool ReignEngine_SetCameraAngle(int plugin, float angle)
struct RE_plugin *p = get_plugin(plugin);
if (!p)
return false;
p->camera.yaw = -angle;
p->camera.yaw = angle;
return true;
}