aimCamera2D
aimCamera2D(
cameraUpdateContext):void
Aims a Camera2D at its view target, in the plane: whole texels while
pixel-perfect, so a rigid follow keeps the character still on the
screen while the world steps a texel at a time; then the dead zone,
the offset, the damping and the look-ahead, which move the frame by
less than a texel; then the bounds, the zoom range and the orbit’s
limit, which a map’s edge narrows. On the ground plane it follows the
height the character stands at where followHeight asks, and steepens
the pitch over high ground. A teleport or a new target snaps. With no
target the frame holds. A Camera2D runs it before the plugins’ hooks
while it follows; with follow={null}, a game’s onCameraUpdate runs
it where its own aim wants it.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
cameraUpdateContext |
CameraUpdateContext |
Returns
Section titled “Returns”void