Add collision teleport portals and ledge-safe movement in VNext dungeons

This commit is contained in:
dingo
2026-02-14 15:05:10 -05:00
parent 147e7d625d
commit 8f7098af81
9 changed files with 382 additions and 34 deletions
+29
View File
@@ -114,3 +114,32 @@
- `object_remove`: `{ id }`
- `npc_upsert`: `{ id, x, y, npcDefinitionId, npcName, rotation, metadataJson }`
- `npc_remove`: `{ id }`
## Dungeon Portals and Ledge-Safe Movement
- Movement collision now uses entity radius checks against tile walkability.
- Prevents edge-clipping / hanging off non-walkable ledges while moving.
- Dungeon supports collision-triggered teleport portals with server-authoritative destination.
### DUNGEON_STATE portal payload additions
- `portals[]` now also includes:
- `triggerOnCollision` (bool)
- `triggerRadius` (pixels)
- `destinationX`, `destinationY` (world-space pixels, nullable)
### DUNGEON_STATE placed object payload additions
- `placedObjects[]` now also includes:
- `triggeredByWalk`
- `interactionType`
- `metadataJson`
### Template portal metadata convention
- Room template object placements can define portal destination via `OverridesJson`:
- Pixel destination:
- `{ "targetX": 1024, "targetY": 640 }`
- Tile destination:
- `{ "targetTileX": 32, "targetTileY": 20, "useTileCoords": true }`
- VNext maps object templates of type `Portal` into runtime collision portals when destination metadata is present.