What problem does it solve?
This Skill helps you create and work with curve-based paths in Phaser 4, so you can reliably draw motion paths, sample points, and move sprites smoothly along complex trajectories.
Core Features & Use Cases
- Path construction from multiple curve segments: chain lines, splines, Beziers, ellipses/circles, and manage gaps or closure for compound paths.
- Point sampling and math utilities: get points by normalized curve parameters or arc-length spacing, plus tangents, lengths, and bounds.
- Sprite motion via PathFollower: attach a follower to a path and configure duration, rotation-to-path, repeat/yoyo behavior, and runtime path swapping.
- Use Case: create an enemy flight route that starts at a spawn point, follows a spline with Bezier turns, and automatically rotates to face travel direction while looping for a boss phase.
Quick Start
Set up a Path in your Scene, add curve segments to it, draw it with Graphics, and start a follower that traverses the path while rotating to its direction.