Let's cover an example showcasing these differences in action:
- Open ch04_01_model-view-translation.html in your browser:
- From a distance, we are looking at the positive z-axis of a cone located at the origin of the world. There are three sliders that allow you to translate either the world or the camera on the x, y, and z axes, respectively. The world space is activated by default.
- By looking at the World matrix on the screen, can you tell where the origin of the world is? Is it [0, 0, 0]?
Hint
Check where we define translations in the Model-View matrix.
Check where we define translations in the Model-View matrix.
- We can think of the canvas as the image that our camera sees. If the world's center is at [0, -2, -50], where is the camera?
- If we want to get closer to the cone, we need to move the center of the world toward the camera. We know that the camera is...