Hello! Firstly awesome package, thanks for a free version! So I’m trying to write a voxel game like minecraft but more similar to RTS gameplay (you’re a mining company mining blocks with vehicles).
The problem I’m having is I don’t know how to tell Astar to prevent an agent from pathing across different ground elevations without a ramp (dropping off edges or trying to path uphill). I thought it would be handled by the “Max Climb”/“Max Slope”:
Max Climb/Slope Settings
But that doesn’t seem to work (note: each block is 10x10x10). The agent tries to path up to the elevation above (which should be inaccessible) and clips through the colliders and falls into the abyss. It can also fall from the top to the bottom, which is not what I want to happen in this game (a mining vehicle falling down 10m onto the block below). This is what happens when trying to path uphill:
What I have tried is using the “erode” functionality, which works, but then the blocks wont be pathable at all. So I split each block into 4 so that 1 erode iteration still lets the block be pathable: 4x Split
This works but is very wasteful of resources, and slows things down a huge amount since each chunk im updating is 5x5 voxels it goes from 25 points to 20x20=400 points per chunk plus erode which I think is expensive.
How should I be solving this? The Max Climb doesn’t seem to do what I expect it to, and the agent can path both through the blocks it should collide with, and also will fall off the edges it shouldn’t be able to. I feel this would be easy to fix if I could somehow tell Astar that the cost of traversing the edge is infinite, but also allow ramps the agents can use. Any ideas what I’m doing wrong, or how I should be solving this?