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.
Targeting
| Data | Description |
|---|
| Target | Container/world to transform (camera applies position/scale here) |
| Follow | DisplayObject to track |
Movement
| Data | Description |
|---|
| Enable | Toggle camera updates (default: true) |
| Follow Lerp | 0 = instant, 1 = no movement; lower is snappier (default: 0.15) |
| Offset X | Additional horizontal offset applied to follow target (default: 0) |
| Offset Y | Additional vertical offset applied to follow target (default: 0) |
Zoom
| Data | Description |
|---|
| Zoom | Camera zoom (default: 1) |
| Min Zoom | Lower clamp for zoom (default: 0.1) |
| Max Zoom | Upper clamp for zoom (default: 10) |
Bounds
| Data | Description |
|---|
| Bounds Enabled | Enable world bounds (default: false) |
| Bounds X | Bounds origin X (default: 0) |
| Bounds Y | Bounds origin Y (default: 0) |
| Bounds Width | Bounds width (default: 1000) |
| Bounds Height | Bounds height (default: 1000) |
| Bounds Object | Full bounds object {x, y, width, height} |
Signals
| Signal | Description |
|---|
| Apply Now | Force an immediate update |
Outputs
| Data | Description |
|---|
| Camera X | Camera center X in world coordinates |
| Camera Y | Camera center Y in world coordinates |
| Zoom | Current 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.