What problem does it solve?
This Skill helps you set up Phaser 4 Arcade Physics so game objects move, collide, and respond to gravity and world bounds correctly without getting stuck in boilerplate.
Core Features & Use Cases
- Enable Arcade Physics: Configure Arcade Physics in the Scene/Game config and ensure the physics world steps with the right gravity, bounds, and debug behavior.
- Control dynamic bodies: Apply velocity, acceleration, drag/damping, bounce, per-body gravity, collision events, and motion limits.
- Use static bodies and collision logic: Create static platforms via static groups/bodies, refresh static body transforms after scaling/moving, and wire up persistent collide/overlap checks.
- Filter collisions with categories: Use collision category/mask bitmasks to restrict what collides with what (including group-level filtering).
- Quick use cases: Platformers (gravity + world bounds + colliders), item pickups (overlap triggers), and enemy hit detection (collide callbacks with optional filtering).
Quick Start
Create a Scene that uses this.physics.add.sprite(...) for your player and this.physics.add.staticGroup() for platforms, then register this.physics.add.collider(...) and control motion in update() with setVelocityX based on input.