I’m a new A* pro version user and I can’t achieve to have a correct recast graph on a simple hill.
Here’s a screen of my problem:
To give you an idea of the scale, the guy is 2 units tall.
As you can see, the recast graph is OK on the border, but seems to totally ignore the center of the mesh!
I tested a lot of different cell sizes, walkable climbs, max slopes, max edge lengths and errors and so on… But I can’t get a correct nav mesh on a very simple terrain like this one. By the way, this is not a Unity terrain, this is a simple mesh, with a mesh collider too.
Any ideas? Something I missed?
Thanks a lot and have a nice day!
This is the expected behaviour. The navmesh usually does not encode the exact Y coordinate of the terrain, only where the character can walk and where it cannot. Regular unity physics can be used for character collision with the terrain.
If you really want to encode the y-coordinate with slightly better precision, you could use a tiled recast graph (see recast graph settings).
Thanks for your answer! I finally understood this after additionnal tests (and totally forgot to update my post, shame on me…). I was misled by the look of native Unity-generated navmeshes which have very good Y axis accuracy… But as you said, with a character controller on each ia agent, the Y coordinate of the navmesh doesn’t need to be that accurate.
This might become an issue with multi-floor buildings/structures, but at the moment, it seems to work OK for me. Wait and see…
Anyways, it’s always good to have a confirmation from the A* guru
Thanks a lot, have a nice day and keep up your amazing work!