# Cameras

> Aego 0.12.5 · development; docs build `4a32b816933e02930662f6a443cb25abe6050d090c55e237cbff5c44ae9b25f8`. [Build manifest](/docs-build.json).

[Camera2D](/ref/engine.Camera2D.md) renders an orthographic view from the node's 2D transform. Only cameras with [Active](/ref/engine.Camera2D.html#engine.Camera2D.Active.md) on render.

## Zoom and scaling

[Zoom](/ref/engine.Camera2D.html#engine.Camera2D.Zoom.md) is pixels per world unit; the default is 64. Larger values show a smaller part of the world.

[Scale](/ref/engine.Camera2D.html#engine.Camera2D.Scale.md) decides how the view follows the window size:

| Mode | Behaviour |
|---|---|
| free | the visible area grows with the window |
| pixelPerfect | keeps whole-pixel scaling of the [Virtual](/ref/engine.Camera2D.html#engine.Camera2D.Virtual.md) resolution |
| fitVirtual | fits the [Virtual](/ref/engine.Camera2D.html#engine.Camera2D.Virtual.md) resolution into the window |

## Several cameras

[Viewport](/ref/engine.Camera2D.html#engine.Camera2D.Viewport.md) is the part of the screen the camera draws into, in normalized coordinates; (0, 0, 1, 1) is the whole screen. Cameras render by [Order](/ref/engine.Camera2D.html#engine.Camera2D.Order.md), lower first. [Mask](/ref/engine.Camera2D.html#engine.Camera2D.Mask.md) selects visibility layers, -1 renders all of them. A camera drawn over another one usually turns [Clear](/ref/engine.Camera2D.html#engine.Camera2D.Clear.md) off; otherwise it fills its viewport with [ClearColor](/ref/engine.Camera2D.html#engine.Camera2D.ClearColor.md) first.

## Virtual cameras

A [Virtual Camera 2D](/ref/camera.VirtualCamera2D.md) can drive the view of a Camera 2D: follow a target, blend between shots, shake and react to zones. See [Cameras 2D](/camera.md).
