What problem does it solve?
This Skill unit addresses the challenges of collision detection and resolution in FS.GG UI products, offering deterministic and efficient broad-phase and narrow-phase collision handling.
Core Features & Use Cases
- Narrow-phase Collision Detection: Determines overlaps and penetration depth between shapes using detectors like
aabbContact, circleContact, and polygonContact.
- Broad-phase Collision Pruning: Utilizes
SpatialGrid for efficient broad-phase queries to reduce unnecessary narrow-phase computations.
- Response to Collisions: Calculates and applies collision responses like pushing objects apart and sliding objects along surfaces.
- Use Case: In a game or simulation built with the FS.GG platform, use this Skill to ensure that objects in the UI interact with each other realistically and according to physical laws.
Quick Start
Implement the resolvePass function to handle collisions for your game, which includes building the SpatialGrid and querying it for nearby bodies, followed by determining and applying the appropriate collision responses.