cameras

Configure Phaser 4 cameras for viewport rendering, scrolling, zoom, and target following.

1|Updated May 3, 2026
One-click install
npx skills add https://github.com/WanderTheWeeb/papas_trauma --skill cameras-wandertheweeb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cameras
Source: https://github.com/WanderTheWeeb/papas_trauma/tree/main/skills/cameras
Command: npx skills add https://github.com/WanderTheWeeb/papas_trauma --skill cameras-wandertheweeb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps you control what players see by configuring Phaser 4 cameras for scrolling worlds, zooming, following targets, and applying cinematic camera effects without fighting coordinate systems.

Core Features & Use Cases

  • Viewport and world control: Distinguish and use viewport positioning (where the camera renders on the screen) versus scroll (what part of the world is shown).
  • Target tracking: Follow sprites with optional smoothing (lerp) and deadzones for stable framing.
  • Cinematic camera effects: Shake, fade, flash, pan, zoomTo, and rotateTo with event hooks and reset functionality.
  • Multi-camera setups: Create multiple cameras (e.g., minimap + HUD camera) and use ignore lists to control what each camera renders.

Quick Start

Use the scene's create() method to configure the main camera with scrolling, follow, zoom, bounds, and an effect like shake so the view stays centered and dynamic during gameplay.

Frequently Asked Questions about cameras

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

FAQPage Schema
How do I make a Phaser 4 camera follow a sprite with smoothing?

To make a Phaser 4 camera follow a sprite, call startFollow on the scene's main camera with target sprite arguments, applying optional lerp smoothing and deadzones for stable framing during gameplay.

What's the best way to set up a minimap and HUD using multiple cameras in Phaser?

Setting up a minimap and HUD in Phaser involves adding multiple cameras via the CameraManager and using ignore lists to control exactly what each camera renders on the screen viewport.

How do I apply cinematic camera effects like shake and fade in Phaser?

Cinematic camera effects in Phaser are applied by calling effect methods like shake, fade, flash, pan, zoomTo, and rotateTo on the camera, which include event hooks and reset functionality.

Why does my Phaser camera scroll show the wrong part of the world?

Phaser camera scroll issues happen when viewport positioning is confused with world scroll; use setScroll to define what part of the world is shown and setBounds to limit the viewable area.

Can I use Phaser camera zoom and bounds together for side-scroller games?

Yes, you can use Phaser camera zoom and bounds together for side-scroller games by calling setBounds to limit the world view and adjusting zoom to manage viewport rendering scale dynamically.

Do I need multiple cameras to render a HUD independently from the scrolling world?

You need multiple cameras to render a HUD independently from the scrolling world; added cameras can ignore world sprites and render fixed UI elements directly onto the screen viewport.