Pathfinding - `agentGoto` ignores dynamic obstacle


in the Playground example below I have a problem with the pathfinding agent ignoring dynamic obstacle. I cant figure out what is the problem there:

I compared it side by side with another example with dynamic obstacle I found ( Babylon.js Playground ), and I cant really see what is the issue in my code.

Thanks for any hint in advance.

cc @Cedric

Hi @yedpodtrzitko
Tilesize is missing in the navigation mesh parameters. As written in the documentation Babylon.js docs

note the addition of tileSize. It's the world unit size of each tile. If it's not present or has a value a zero, it falls back to the standard use and obstacles won't work.

It can be a bit difficul to set it properly in correlation with ch/cs. It’s usualy an issue with scaling (cell is too big/too small compared to world size). I usually start with an example from the documentation that works and step by step change it so it works with my datas/mesh/world units.

1 Like

thanks for your response. I had tileSize in the code for several attempts (even though it’s commented out in the provided sample), but ultimately changing cs and ch does the trick.

Would it make sense to check for tileSize presence inside addCylinderObstacle() etc. to avoid this footgun, or are there scenarios where this wouldnt work?

yes, it makes sense for a message/warning. I need to think how to get the error from native back to JS