mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
fix issue: Camera exercise 2 comment nitpick #382, corrected minor typo in comment.
This commit is contained in:
@@ -12,7 +12,7 @@ glm::mat4 calculate_lookAt_matrix(glm::vec3 position, glm::vec3 target, glm::vec
|
|||||||
// Create translation and rotation matrix
|
// Create translation and rotation matrix
|
||||||
// In glm we access elements as mat[col][row] due to column-major layout
|
// 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
|
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][1] = -position.y;
|
||||||
translation[3][2] = -position.z;
|
translation[3][2] = -position.z;
|
||||||
glm::mat4 rotation = glm::mat4(1.0f);
|
glm::mat4 rotation = glm::mat4(1.0f);
|
||||||
|
|||||||
Reference in New Issue
Block a user