What problem does it solve?
Managing Phaser 4 cameras can be verbose and error-prone, especially with multiple viewports, world scrolling, and a variety of effects.
Core Features & Use Cases
- Central CameraManager to orchestrate all cameras in a scene and provide a main camera reference
- Distinction between viewport and world scroll, enabling mini-maps, HUD cameras, and gameplay cameras
- Rich camera effects: fade, flash, shake, pan, zoomTo, rotateTo, with event hooks
- Follow targets with configurable lerp, dead zones, and bounds to keep gameplay smooth
- Multi-camera setups with ignore lists, filters, and per-camera viewport control
- Broad usage in HUDs, minimaps, cutscenes, and gameplay sequences
Quick Start
In a Phaser scene, access the main camera via this.cameras.main and perform a basic scroll to a point, then start following a target to see the camera move.