Camera¶
This section is dedicated to the various camera objects in Torque 3D. The base Camera object that is typically manipulated by a GameConnection’s input. A Path Camera moves along a path.
Classes¶
Functions¶
-
void
setDefaultFov
(float defaultFOV)¶ Set the default FOV for a camera.
Parameters: defaultFOV – The default field of view in degrees
-
void
setFov
(float FOV)¶ Set the FOV of the camera.
Parameters: FOV – The camera’s new FOV in degrees
-
void
setZoomSpeed
(int speed)¶ Set the zoom speed of the camera. This affects how quickly the camera changes from one field of view to another.
Parameters: speed – The camera’s zoom speed in ms per 90deg FOV change
Enumerations¶
-
enum CameraMotionMode
Movement behavior type for Camera.
Parameters: - Stationary – Camera does not rotate or move.
- FreeRotate – Camera may rotate but does not move.
- Fly – Camera may rotate and move freely.
- OrbitObject – Camera orbits about a given object. Damage flash and white out is determined by the object being orbited. See Camera::setOrbitMode() to set the orbit object and other parameters.
- OrbitPoint – Camera orbits about a given point. See Camera::setOrbitMode() to set the orbit point and other parameters.
- TrackObject – Camera always faces a given object. See Camera::setTrackObject() to set the object to track and a distance to remain from the object.
- Overhead – Camera moves in the XY plane.
- EditOrbit – Used by the World Editor to orbit about a point. When first activated, the camera is rotated to face the orbit point rather than move to it.
Variables¶
-
int
Camera::
extendedMovePosRotIndex
¶ The ExtendedMove position/rotation index used for camera movements.
-
float
Camera::
movementSpeed
¶ Global camera movement speed in units/s (typically m/s), with a base value of 40.
Used in the following camera modes:
- Edit Orbit Mode
- Fly Mode
- Overhead Mode