4 ms·
It is usually used to create a matrix for the camera orientation given a) the camera position in XYZ coordinates, b) a point the camera is looking at in XYZ coo
by bl0b 6y ago
It is usually used to create a matrix for the camera orientation given a) the camera position in XYZ coordinates, b) a point the camera is looking at in XYZ coordinates, and c) the direction of 'up' in the world (otherwise the camera would be able to spin freely along it's Z axis while still satisfying the 'look at point A from point B' requirement). You build up the 3 axes of the camera orientation step-by-step. The 3 axes can then be plugged directly into the transformation matrix, and voila.
When I was learning 3D graphics, I found this site an excellent resource. Here is the page with a more in-depth explanation of the 'look at' function:
https://learnopengl.com/Getting-started/Camera https://learnopengl.com/Getting-started/Camera