From 45f2cc817c23380dac61184c8cd4bfd57f46cfb0 Mon Sep 17 00:00:00 2001 From: AoZhang Date: Thu, 11 Apr 2024 09:52:03 +0800 Subject: [PATCH] fix issue: Camera exercise 2 comment nitpick #382, corrected minor typo in comment. --- src/1.getting_started/7.6.camera_exercise2/camera_exercise2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/1.getting_started/7.6.camera_exercise2/camera_exercise2.cpp b/src/1.getting_started/7.6.camera_exercise2/camera_exercise2.cpp index a8768e81b..cf80ea47e 100644 --- a/src/1.getting_started/7.6.camera_exercise2/camera_exercise2.cpp +++ b/src/1.getting_started/7.6.camera_exercise2/camera_exercise2.cpp @@ -12,7 +12,7 @@ glm::mat4 calculate_lookAt_matrix(glm::vec3 position, glm::vec3 target, glm::vec // Create translation and rotation matrix // In glm we access elements as mat[col][row] due to column-major layout glm::mat4 translation = glm::mat4(1.0f); // Identity matrix by default - translation[3][0] = -position.x; // Third column, first row + translation[3][0] = -position.x; // Fourth column, first row translation[3][1] = -position.y; translation[3][2] = -position.z; glm::mat4 rotation = glm::mat4(1.0f);