What problem does it solve?
This Skill helps you create smooth movement and rendering paths in Phaser by converting curve math into usable Path and PathFollower behaviors without manual point-by-point work.
Core Features & Use Cases
- Path building from curves: Chain line, spline, cubic/quadratic Bezier, ellipse/circle, moveTo, and closePath operations into a single Phaser.Curves.Path.
- Accurate point sampling: Retrieve points along a path using getPoints, getSpacedPoints (arc-length based), tangents, length, bounds, and curve-level data.
- Sprite auto-following: Drive a Phaser.GameObjects.PathFollower with a Tween-backed PathConfig so sprites can move, rotate to path direction, repeat, and yoyo along the curve.
- Use case: Create an enemy that smoothly travels an elliptical or Bezier route while rotating to match the curve direction, and dynamically redraw or retarget the path as gameplay changes.
Quick Start
Use the curves-and-paths skill to generate a Phaser 4 scene snippet that creates a path, draws it with Graphics, and starts a follower that traverses the path with rotateToPath enabled.