Skip to main content

Pixi Camera2D

Camera utility to follow a target and control zoom/pan within optional bounds.

The Pixi Camera2D node updates a target container's position and scale to frame the scene, optionally following a specific display object with smoothing and world bounds.

Inputs

Targeting

DataDescription
TargetContainer/world to transform (camera applies position/scale here)
FollowDisplayObject to track

Movement

DataDescription
EnableToggle camera updates (default: true)
Follow Lerp0 = instant, 1 = no movement; lower is snappier (default: 0.15)
Offset XAdditional horizontal offset applied to follow target (default: 0)
Offset YAdditional vertical offset applied to follow target (default: 0)

Zoom

DataDescription
ZoomCamera zoom (default: 1)
Min ZoomLower clamp for zoom (default: 0.1)
Max ZoomUpper clamp for zoom (default: 10)

Bounds

DataDescription
Bounds EnabledEnable world bounds (default: false)
Bounds XBounds origin X (default: 0)
Bounds YBounds origin Y (default: 0)
Bounds WidthBounds width (default: 1000)
Bounds HeightBounds height (default: 1000)
Bounds ObjectFull bounds object {x, y, width, height}

Signals

SignalDescription
Apply NowForce an immediate update

Outputs

DataDescription
Camera XCamera center X in world coordinates
Camera YCamera center Y in world coordinates
ZoomCurrent zoom

Usage

  • Connect Target to the root scene/container you want to pan/zoom.
  • Set Follow to the display object to track, adjust Follow Lerp for smoothing.
  • Configure Zoom and optional Bounds to limit movement.
  • Trigger Apply Now to sync position/zoom immediately.