Hi I’m struggling with my AI not taking shortest path(see img), I guess its my navmesh properties that are not right, any advice on how to fix this? Thanks in advance
Playground:
Hi I’m struggling with my AI not taking shortest path(see img), I guess its my navmesh properties that are not right, any advice on how to fix this? Thanks in advance
Playground:
Update: in the original example I used several cubes, but when I test with only one long cube it finds the shortest path…
I can recreate the problem, but have no idea how to fix it. Alternatively, I would suggest using a library that can find the shortest path between two points in a maze:
thanks will check it out
This is a weird behavior I can’t explain. I guess it’s the multiple boxes that create extra triangles in the navmesh. Hard to say without a c++ repro and debugging.
Maybe be related and if so would be a known problem with Recast (not Babylon). See here Not direct path in some situations · Issue #239 · recastnavigation/recastnavigation · GitHub
A workaround is to have less nodes to traverse.
thanks by any chance, what settings did you use?
I didn’t find a good method that works well and for sure.
But, a good start is to have a good minRegionArea
and then tweak other values. It seems removing small area where agents can’t go, simplifies the geometry substancialy.
Best is to tweak the input geometry in this case.