Aego Русский

Cameras

Camera2D renders an orthographic view from the node's 2D transform. Only cameras with Active on render.

On this page

Zoom and scaling

Zoom is pixels per world unit; the default is 64. Larger values show a smaller part of the world.

Scale 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 resolution
fitVirtual fits the Virtual resolution into the window

Several cameras

Viewport 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, lower first. Mask selects visibility layers, -1 renders all of them. A camera drawn over another one usually turns Clear off; otherwise it fills its viewport with ClearColor first.

Virtual cameras

A Virtual Camera 2D can drive the view of a Camera 2D: follow a target, blend between shots, shake and react to zones. See Cameras 2D.