3D Cameras

Trial offers a couple of different 3D cameras. However, it is very likely that you'll want to heavily customise them to your particular use-case, as optimal camera movement in games is a very difficult and situation-specific topic.

At the basis is the 3d-camera, which sets up a perspective projection, based on the fov parameter. The fov is designated in degrees, and should be between 0 and 180. Each of the cameras also implements a focal-point, which is used for certain rendering optimisations and can be used for special effects as well.

The target-camera simply ensures that the camera is always looking at the target position. The target should be some kind of object with a location that resolves to a world-space position.

The following-camera instead uses the camera's location as a fixed offset from the target.

The fps-camera implements basic first-person look using mouse input. Using the x-acceleration and y-acceleration properties you can control the speed of the turning and invert it for each axis separately as well.

The freeroam-camera additionally implements moving and strafing on top of the fps-camera. However, since neither the freeroam nor the basic fps camera use the action system, it is recommended that you instead replicate their logic in your own system.

Finally the editor-camera is the same as the freeroam-camera but locking the looking behind the middle mouse or control buttons, to ensure the mouse can be normally moved without moving the view.