-
Notifications
You must be signed in to change notification settings - Fork 2
Collision Detection
Isthimius edited this page Jun 22, 2026
·
1 revision
Gondwana’s collision system is scene-oriented and AABB-based.
Each Scene owns collision groups, and each SceneLayer exposes a collider registry and a collision resolver.
The current resolver is intentionally simple and practical:
- broad-phase query against the registry
- overlap detection in world pixel space
- trigger overlaps reported without push-out
- solid-vs-solid collisions resolved by minimum-axis push-out
- blocked velocity components are canceled so motion can slide on the free axis
Gondwana is a 2.5D rendering engine with strong tile/sprite assumptions. AABB collision is a good match for that style of game logic and keeps the runtime behavior understandable.
Collision resolution runs after movement in the engine cycle. That means movers advance first, then get corrected if they overlap.
Movement produces a proposed position.
Collision resolution decides whether that position is legal.
Gondwana/Collisions/CollisionResolver.csGondwana/Collisions/Gondwana/Scenes/SceneLayer.cs