cameras

Configure Phaser 4 cameras for viewports, scrolling, and cinematic effects.

40.1k|7.2k|Updated Apr 12, 2013
One-click install
npx skills add https://github.com/phaserjs/phaser --skill cameras-phaserjs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cameras
Source: https://github.com/phaserjs/phaser/tree/main/skills/cameras
Command: npx skills add https://github.com/phaserjs/phaser --skill cameras-phaserjs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Configuring and coordinating Phaser 4 cameras to manage multiple viewports, world scrolling, and cinematic effects in games.

Core Features & Use Cases

  • Manage a CameraManager with a main camera and multiple additional cameras, including minimaps and HUD cameras.
  • Control viewport vs world scroll, zoom, bounds, and deadzones to keep targets in view during gameplay.
  • Apply camera effects (fade, flash, shake, pan, zoomTo, rotateTo) and filters to create cinematic sequences and UI transitions.
  • Support for keyboard controls, world-point conversion, ignore lists, and camera events for robust scene orchestration.

Quick Start

Set up a Scene with a main camera that follows a player and add a secondary minimap camera to monitor the world.

Frequently Asked Questions about cameras

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up multiple cameras in Phaser 4 for a minimap and HUD?

Use the Phaser 4 CameraManager to create a main camera following the player and add secondary cameras for minimaps or HUD layers. This manages multiple viewports simultaneously within a single scene.

How do I make a Phaser camera follow a player with a deadzone?

Configure camera follow with bounds and deadzone settings to keep targets in view during gameplay. The deadzone prevents camera movement until the player exits a defined central area, ensuring smooth world scrolling.

Can I apply cinematic effects like fade, shake, and zoom in Phaser?

Yes, you can apply camera effects including fade, flash, shake, pan, zoomTo, and rotateTo in Phaser 4. These effects modules create cinematic sequences and UI transitions during scene orchestration.

Does Phaser 4 camera system support custom viewport scrolling?

Yes, the Phaser 4 camera system supports viewport vs world scroll control. You can manage zoom levels, set bounds, and use keyboard controls to manipulate what the camera displays across the game world.

How do I convert screen pointers to world points using a Phaser camera?

Use the world-point conversion APIs provided by BaseCamera to translate screen coordinates into world coordinates. This supports accurate input handling across different camera views and zoom levels.

What are the limitations of using multiple camera ignore lists in Phaser?

Camera ignore lists prevent specific game objects from rendering on chosen cameras, but managing these lists across multiple cameras requires careful orchestration. Ignored objects will not appear in that camera's viewport, affecting minimap or HUD visibility.