I’ve been trying to create a pathfinding line between my navmesh agent and destination for a project that provides the user with a path to wherever he/she wishes to go within the vicinity. However, I’ve been encountering cases where my path created by the Line Renderer function cuts into the geometrical bodies, and I’m not exactly sure of the parameters that I can play with in order to avoid this situation. Does it have to do with the agent or baking parameters, or the line renderer function? Attached some images of my line cutting the steps, as well as my NPC move script. Appreciate any kind soul’s assistance. Thanks!
Hi all, now I have a new problem instead of the line cutting across the stairs. I realise my line renderer now no longer traverses along the slope, but it goes off tangent at the start of the slope angle, as shown in the image. Why is the navpath not sticking to the surfaces prescribed by the baked navmesh?
Is there anything to do with the height mesh? voxel size? baked agent settings (radius, height, slope, step height, etc)?
I’m also concerned if all the building and ground geometries need to belong to a same family of sorts? e.g. prefab, child-parent?
I’ve tried various ways and still facing the same set of problems. My line keeps cutting across the surfaces and flies above the surfaces, instead of following closely to the baked surfaces. Does Navmesh work on slopes? Do I really need to use stairs instead of a plane/sloped cube? It seems for my case the problem occurs when Navmesh is not able to navigate my stairs properly.
Slopes really shouldn’t be the issue here. Are you certain your NavMesh is properly following the slope there? How does your agent move? Following the slope more, or following the line?