What problem does it solve?
This Skill helps you work efficiently with Phaser 4 geometry shapes and math utilities so you can compute containment, intersections, and numeric transforms without reinventing formulas.
Core Features & Use Cases
- Geometry shape utilities: Create and query data-only shapes such as Circle, Rectangle, Line, Polygon, Triangle, and Ellipse for point tests and perimeter sampling.
- Intersection testing: Determine overlaps and intersections between shapes (Circle, Rectangle, Line, Triangle, Polygon) with boolean checks and “Get*” functions that return intersection points.
- Math toolbelt for gameplay: Use Phaser.Math helpers for angles, distance, interpolation, easing, snapping, clamping, and seeded randomness for reproducible behavior.
- Use case: Decide whether a projectile path intersects a target hitbox (rectangle), then compute intersection points to place effects precisely along the collision boundary.
Quick Start
Use the geometry-and-math Skill to compute whether a circle hitbox intersects a rectangle and to retrieve the intersection points you can feed into your rendering logic.