Reading Camera Properties
-
Prerequisite
Description
You can read some information about the currently active camera using this block.
- Distance: how far is the camera from the target point
- V-Angle: the vertical view angle of the camera, between 0 degrees and 180 degrees.
- H-Angle: the horizontal view angle of the camera.
- Target X: the x position of the target point of the camera.
- Target Y: the x position of the target point of the camera.
- Target Z: the x position of the target point of the camera.
- X Position: the x position of the camera.
- Y Position: the y position of the camera.
- Z Position: the z position of the camera.
Demo
As we rotate, zoom or shift the camera, we can see the reported property values change accordingly.
Moving the Camera or the Target?
Note that there are 2 types of operations on the camera:
Moving the Target Point:
When you use the right mouse key to shift the target point, or with the “A”, “D”, “Q”, “E” keys on the keyboard, you are moving the target point itself, and the camera will stay at the same relative position to the target.
In the example below, we shift the target point, so the distance and angle of the camera stay the same, but the “target x” is changed:
Moving the Camera Relative to the Target:
When you use the left mouse key to rotate the camera, or the middle scroll button of the mouse to zoom in/out, or use the “W” and “S” keys to zoom in/out, you are keeping the target point the same, but moving the camera relative to that target point.
In the example below, we rotate and zoom the camera, so the distance and angle of the camera are both changed, but the “target x” stays the same:
-