Help updating recast graph with placed base part items

Hi there,

I have a question about a base budling system I have just finished and how to make it work cleanly with pathfinding. Currently I am using some navmesh cuts to stop AI running through walls however this does not work well for allowing AI to actually navigate a player base. For instance if a player builds some steps up to a platform this is not actually part of the recast graph and as such AI can’t walk up it. This makes it very easy to cheese enemies. What is the correct way to handle updating a recast graph when a player places base parts? The game is a large open world so I am pretty sure recast is the only/best graph to use for this situation.

Thanks!

  • A* version: Latest
  • Unity version: 2022

Is anyone able to provide any info on this? Even just letting me know if a recast graph is capable of handling this? Thanks

Hi

It sounds like you want normal graph updates, rather than navmesh cutting. It should support this out of the box.
For a simple solution, just attach the DynamicGraphObstacle component to your base parts.

See Graph Updates during Runtime - A* Pathfinding Project for more info.

Ah this is wonderful, thank you and apologies if I missed this in the documentation, I did read through it but must have not seen that component. Thanks again.