Making games

Cameras

The game draws from a Camera component. A scene can have several (a player’s view, a security monitor, a cutscene angle), and the one with Active turned on is the one the game draws from. Scene → Camera creates one.

To follow something, make the camera a child of it, or move the camera from a script each frame. The Escape example’s camera_follow.cog does the second.

Projection

PropertyWhat it does
ProjectionPerspective for a normal 3D view, Orthographic for a flat one with no shrinking into the distance (strategy maps, 2D-style games).
Field of viewWith perspective, how wide the view is, top to bottom, in degrees. 60 to start.
SizeWith orthographic, how many units tall the view is.
Near clip, Far clipThe closest and farthest the camera can see. Keep near as large as you can get away with: a tiny near clip makes distant surfaces flicker against each other.

The picture

PropertyWhat it does
Clear, Clear colorWhen on, the camera’s own background color behind everything, instead of the editor’s default.
ExposureBrightens or darkens the frame before tonemapping. 1 is the scene as lit.
TonemapHow a bright scene is fit onto a screen: ACES (filmic, the default), Reinhard (gentler), or None.
Bloom intensityHow much glow bright areas get. 0 turns bloom off.
Bloom thresholdHow bright something must be to glow. 1 is “brighter than the screen can show”.

Scripts can read the active camera’s direction as Camera.forward and Camera.right (each a Vec3), which is how a third-person controller moves relative to the view. See the Cog API.