Camera Types
- Last UpdatedFeb 21, 2024
- 3 minute read
There are two main ways to handle camera movements:
-
Use an avatar.
-
Manage a camera directly.
Avatar
The easiest way to handle a camera is to use an avatar node. The avatar has different ways to manage a camera according to its current mode.
The only step is to assign the camera to the avatar camera field.
Note: Do not directly modify the camera fields when in Avatar mode.
Target
A target camera is a camera pointing a precise point in the space called target. Target camera always keeps the target at the center of the camera screen space.
There are two typical ways to use a target camera.
|
Method |
Description |
|---|---|
|
Following target movements |
The camera automatically rotates to center the target on the screen. |
|
Moving the camera around the target |
The camera moves around the target. |
-
To move the camera around the target, the useYawPitchPosition parameter must be set to true.
-
Then using yaw, pitch, and zoom, you can rotate the camera around target position.
-
In case the target is moving such as when doing a screen panning, the same amount of displacement must be added to Target and yawPitchPosition parameters.
Camera
The camera mode is seldom used. It enables you to implement an MWX exported camera path.
-
Set camera field to MWX camera name.
-
Use an animation node to handle path movement.
-
Use pitch and yaw to modify the camera orientation in the exported one.
You can also implement Camera path using camera target with the camera field set to Exported camera and the follow field set to true.
Remote
A remote camera is a camera driven from external data. For example, a camera reproducing the same view of another camera in another application.
When camera is set to remote, it can be driven only by cameraData parameter. This parameter represents the serialization of all and only the parameters needed to drive the camera.
The typical use is to link cameraData to reproduce the same visual output in real time in different applications or viewpoints.
Matrix
A matrix camera is a camera driven from the matrix field, where a valid transformation matrix must be used. The camera will always be positioned at the translation part of the matrix in World space and it will look toward the positive Z axis of the matrix itself. The position and target fields in the matrix mode always reflect the correct values but are read-only values. Changing the values manually or from script will have no effect on the actual camera posture.
Camera Tracker
The camera tracker works only in avatar mode. It enables you to link a position tracker to manage camera position and orientation.
This can be useful for implementing support for cave systems, VR helmets, and also in some special situations.
Tracker position
Setting trackerPosition enables you to modify camera position according to trackerPositionMode.
|
Position |
Description |
|---|---|
|
none |
Not used. |
|
add |
The position is added to camera position. |
|
xz |
Applies trackerOrientation yaw transform to the position vector and then adds to camera position. |
|
relative |
Applies complete trackerOrientation transform to the vector and then adds to camera position. |
Tracker orientation
Setting trackerOrientation enables you to modify camera position according to trackerOrientationMode.
|
Orientation |
Description |
|---|---|
|
none |
Not used. |
|
add |
The orientation overrides camera roll, and adds pitch and roll. |
|
overwrite |
The orientation overrides camera pitch and roll, and adds yaw. |
Tracker Position head
Adds a displacement among the position of the target and the center of rotation in the xz (as eyes are not at the center of the head).
Cave
Consider the relative position between camera and screen when using a cave.
Set caveEnabled toTrue to enable and provide cavePoints to correctly map Top left, Top right, and Bottom left cave screen positions, relative to the user position.
Note that Viewport cave fields would conflict with a camera caveEnabled logic. It is recommended to use the Viewport cave instead of a camera with caveEnabled.