Hi guys. I want to manually move my character controller along a path that NavMesh.CalculatePath()
gives me. Unity’s NavMeshAgent
doesn’t work for me, because the movement of my character controller is very custom and specific. I want the player character and the AI characters to use the same movement. The problem is that the path is not what I am expecting it to be. Here is what I am talking about.
Here the white line is the path that unity gives me. The red line is the path I want.
Here is the navmesh which looks fine.
Is it possible to somehow tweak this?
I’m having the same problem, not sure how you are moving your controller but if it uses some sort of gravity or something that keeps it stuck to the ground you could ignore the Y axis.
Also having the same issue, i can only guess that the navmesh agents do some addtional work at run time to get correct Y data, either raycasting or sampling the navmesh in some manner.
You can manually go through your paths points and offset the Y value, bit of a hack but can work well enough.
2023 and it still happens! Is this expected behavior?
2022 LTS and it still happens! Does anyone have a good solution?