I’m working on a side-view game using a 3D tile grid (grid[x, y, z]) to represent terrain. Each tile is either walkable (Dug) or solid (Soil). I’m using the Recast Graph with A Pro*, and normal ground movement (on z = 0) works great.
Challenge
I want agents to climb vertically in two situations:
Up/down (Y axis) — to dig tunnels vertically (e.g. digging into a ceiling or dropping into a shaft)
Forward/backward (Z axis) — when digging into multi-layered rooms (e.g. climbing from front wall into deeper z+1, z+2)
World Structure
All tunnels exist on z = 0 and are walked left/right normally
Some rooms go deeper into Z (from z = 0 to z = 3, etc.)
A tile is reachable only if it’s:
A Dug tile the agent can walk onto, or
A solid wall the agent can climb onto or climb down from
What I’m Considering
Using NodeLink2 to define transitions (up, down, or into deeper Z)
Dynamically creating/removing these links as the terrain is dug
Possibly using a custom TraversalProvider to handle special climbing logic
My Questions
What’s the best practice for enabling vertical climbing in this setup?
Should I manually link climbable tiles using NodeLink2, or is there a better method?
Is Recast Graph the best fit for this world structure, or would LayeredGridGraph give more flexibility for vertical transitions?
Thanks for any guidance — I’d love to keep using A* Pro for this system if vertical climbing can be integrated cleanly!
Hi there, I’m trying to wrap my ahead around the concept. It sounds like, since it’s sideview, that the view will be perpendicular to the X axis and move left and right for movement, back and forward for rooms for digging “out/in” and digging up and down on Y-- if that’s not right let me know! Ideally with a screenshot lol
Let me ask this; what’s the usecase for Astar in the first place? Is the player movement controlled through Astar and not directly with left/right/up/down inputs?
Use case for A*
The player doesn’t control dwarves directly with raw left/right/up/down inputs. Instead, they click to assign a dig/build/move task, and the dwarf AI finds its own path there automatically. That’s why I’m using A* Pro — it handles pathfinding around dug/undug terrain and ensures dwarves take valid, walkable routes.
Current status
Using Recast Graph.
Z-depth navigation already works fine — moving into and out of deeper rooms is handled perfectly.
The only challenge is vertical movement along the Y axis (e.g., climbing a 1–3 tile shaft or dropping down).
The problem
Recast Graph can’t detect new vertical connections when the world changes unless I pre-place NodeLink2 objects — but since my terrain is fully destructible, dwarves can dig anywhere, so links must be created/removed dynamically at runtime as tunnels open up.
Main question
What’s the best way to allow dynamic Y-axis transitions (up/down climbing) in a destructible environment using the Recast Graph? Is there a built-in method to detect and create those links on the fly, or do I need to implement my own runtime NodeLink2 placement logic?