cameras

Coordinate Phaser 4 cameras for viewports, scrolling, and effects.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/jallard-007/jallard-ca-server --skill cameras-jallard-007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cameras
Source: https://github.com/jallard-007/jallard-ca-server/tree/main/.github/skills/cameras
Command: npx skills add https://github.com/jallard-007/jallard-ca-server --skill cameras-jallard-007

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Coordinate and control the Phaser 4 camera system to define what the player sees, apply visual effects, and manage multiple viewports across scenes.

Core Features & Use Cases

  • Camera management with a CameraManager (main camera and additional cameras) to handle scrolling, viewports, bounds, and minimaps.
  • Rich camera effects including fade, flash, shake, pan, zoomTo, and rotateTo with event hooks for storytelling.
  • Follow mechanics, dead zones, ignore lists, and multiple cameras to separate world and UI layers efficiently.
  • World-space conversions, render lists, and input compatibility to map screen coordinates to the world and optimize rendering.

Quick Start

Access the main camera in a Scene via this.cameras.main, set up scrolling and bounds, start following a target, and apply a basic fade or zoom as the scene begins.

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 for a minimap and HUD in Phaser 4?

To manage multiple cameras for minimaps and HUDs in Phaser 4, use a dedicated CameraManager to handle additional viewports alongside the main camera, separating world views from UI layers efficiently. You can configure ignore lists to exclude specific objects from certain cameras.

How do I apply camera effects like shake, fade, and zoom in Phaser 4?

Apply camera effects in Phaser 4 using built-in methods on your camera instance, including fade, flash, shake, pan, zoomTo, and rotateTo. These effects support event hooks, allowing you to trigger storytelling or gameplay logic when an animation completes.

What is the best way to make a Phaser 4 camera follow a player sprite?

The best way to make a Phaser 4 camera follow a player sprite is using the camera's follow mechanics. You can configure dead zones to keep the target centered smoothly without rendering unnecessary background movements, optimizing the scrolling experience for your game scene.

Can I convert screen coordinates to world coordinates across different viewports in Phaser 4?

Yes, you can convert screen coordinates to world coordinates in Phaser 4 using built-in world-space conversion functions. This ensures accurate input compatibility across multiple viewports and allows you to map screen interactions directly to the game world.

When should I use separate cameras instead of a single main camera in game development?

Use separate cameras instead of a single main camera in game development when you need independent scrolling, distinct viewport bounds, or overlapping UI layers like minimaps. This approach optimizes rendering by isolating world objects from interface elements via ignore lists.

How do I define viewport boundaries and camera scroll limits in Phaser 4?

Define viewport boundaries and camera scroll limits in Phaser 4 by setting bounds directly on your camera instance. This restricts the camera's visible area to specific world coordinates, preventing players from seeing outside the designated game map.