Understanding glm::lookAt()

The up vector is basically a vector defining your world’s “upwards” direction. In almost all normal cases, this will be the vector (0, 1, 0) i.e. towards positive Y. eye is the position of the camera’s viewpoint, and center is where you are looking at (a position). If you want to use a direction vector D instead of a center position, you can simply use eye … Read more

glm rotate usage in Opengl

You need to multiply your Model matrix. Because that is where model position, scaling and rotation should be (that’s why it’s called the model matrix). All you need to do is (see here) Note that to convert from degrees to radians, use glm::radians(degrees) That takes the Model matrix and applies rotation on top of all the operations that are … Read more