Trigger colliders and Move and slide against solid colliders

- Collider property isTrigger (no blocking, still reports enter/stay/exit)
- Node 'Move and slide' with blocked x/y outputs, axis-wise resolution
- axisSeparation/axisCorrection geometry for box/box, circle/circle, box/circle
- Amber outline for trigger colliders in the viewport
- Demo mover uses Move and slide; E2E step 15b, 7 new unit tests

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
rootandClaude Fable 5.1 committed 2026-09-07 15:38:14 +02:00
1 parent 0a59513b74
commit 6ecb20cf02
14 files changed
+283 -12

No files matched your search

+13 -3
View File
@@ -96,13 +96,23 @@ other). They are editor symbols: green outlines in edit mode, invisible in play
Play runs a `CollisionSystem` (`src/runtime/systems/CollisionSystem.ts`) before the behaviors:
every frame it tests all collider pairs (world positions applied; touching edges do not count)
and sorts them into *enter*, *stay* and *exit*. **Detection only** – nothing is pushed apart
yet. A behavior receives `On collision enter/stay/exit` for the colliders of its **owner**
(its parent; itself when top-level): the outputs are `other` (the other body), `other collider`
and sorts them into *enter*, *stay* and *exit*. Detection never pushes anything apart. A
behavior receives `On collision enter/stay/exit` for the colliders of its **owner** (its
parent; itself when top-level): the outputs are `other` (the other body), `other collider`
and `collider` (the own one). `Is touching(a, b)` answers the same question on demand – an
object stands for its collider children, a collider for itself. The geometry lives in
`src/core/properties/collider.ts` so editor and runtime agree on it.
**Blocking** is opt-in per movement: the `Move and slide` node (same inputs as `Move`) moves
an object one axis at a time and, after each axis, pushes its *solid* colliders back to just
touch any solid collider they ran into – so the other axis still moves and the object slides
along walls. Its `blocked x` / `blocked y` outputs tell which axes hit. A collider with
**Trigger (no blocking)** enabled (`isTrigger`, drawn amber instead of green) still produces
collision events but never blocks. Pairs that already overlapped before the step are left
alone, so an object that starts inside a wall can leave it and stacked objects never jolt apart.
Colliders of the moving object and of anything parented under it travel with it and cannot
block it. Plain `Move` / `Set position` ignore colliders entirely.
## Stack
- **PixiJS v8** – rendering and pointer events. No game engine; runtime systems live in `src/runtime/`.