bongodoctor Posted July 12, 2022 Share Posted July 12, 2022 (edited) I have been doing a little navmeshing around the entrance to my interior. I gave the sentry a small triangular route to take using Patrol Markers which works fine. However I noticed it was taking a weird route back to one of them and looking at the navmesh there was an empty square where a tree used to be (only thing I removed from the exterior cell). So I filled this in with two triangles, and made two new gaps around two trees I had added. This has all worked fine. My question is about the vertical position of the vertices and triangles - do these have to follow the vertical height of all details e.g. stairs and lumps etc - or can I just have triangles which match the overwall slope of the stairs without making separate triangles flush with each stair etc. I am assuming (maybe incorrectly) that if the navmesh is all on a flat plane and there is a small obstacle in the way that a player or AI would walk over ordinarily then it should work ok - or will the AI get stuck on that little rock or mound because the navmesh didn't rise and fall with it? Top down the triangles are easy to see and move etc - but vertically I am really struggling to see which bit is connected to which other bit, and although I can change their height using the z key and dragging, I am finding it very tricky to match the landscape accurately. Inside this shouldn't be a major problem as there aren't any stairs, and the caves only have very simple slopes in straight lines so shouldn't be too hard to map. I finalised the navmesh (not sure how long this is supposed to take or what it actually does) and there is a green triangle outside the door as expected. I only made half a dozen changes/additions in a few areas near the door to allow for the steps, which were slightly steeper than the existing slopes... Edited July 12, 2022 by bongodoctor Link to comment Share on other sites More sharing options...
maxarturo Posted July 12, 2022 Share Posted July 12, 2022 (edited) 1) You don't need to make individual NavMesh steps for the stairs, I for example in almost all my stairs meshes they have only 2 triangles to cover the entire stair (from first step to the last one, only the steps). 2) You don't need to match the geometry of the mesh or the landscape for the NavMesh to work, for example if you make a 'Flat NavMesh' to cover your complex landscape cell and you drag the entire NavMesh bellow the terrain, the NavMesh will still work. NPCs use NavMesh not to exactly navigate through the terrain, but NavMesh shows the AI where the npc can navigate, or where is allow to. 3) Obstacles can only cause the NPC to get stuck if their height is above the height of a common stair's step. 4) Make as bigger as possible your NavMesh triangles, this will help not only you, but also the AI and your plugin to perform better. * NPC AI dosen't care about matching NavMesh geometry to that of the terrain. * If you want your NavMesh vertex / dot to be placed exactly at the terrain height, then select the vertex and press 'F'. * If you want to see some examples on complex cell's NavMesh you can check my last quest mod, here you can see for example the stairs how they are NavMeshed, and many other things Edited July 13, 2022 by maxarturo Link to comment Share on other sites More sharing options...
bongodoctor Posted July 13, 2022 Author Share Posted July 13, 2022 Thanks for the clarification :) This will make things a lot simpler than I thought... 1) You don't need to make individual NavMesh steps for the stairs, I for example in almost all my stairs meshes they have only 2 triangles to cover the entire stair (from first step to the last one, only the steps).2) You don't need to match the geometry of the mesh or the landscape for the NavMesh to work, for example if you make a 'Flat NavMesh' to cover your complex landscape cell and you drag the entire NavMesh bellow the terrain, the NavMesh will still work.NPCs use NavMesh not to exactly navigate through the terrain, but NavMesh shows the AI where the npc can navigate, or where is allow to.3) Obstacles can only cause the NPC to get stuck if their height is above the height of a common stair's step.4) Make as bigger as possible your NavMesh triangles, this will help not only you, but also the AI and your plugin to perform better.* NPC AI dosen't care about matching NavMesh geometry to that of the terrain.* If you want your NavMesh vertex / dot to be placed exactly at the terrain height, then select the vertex and press 'F'.* If you want to see some examples on complex cell's NavMesh you can check my last quest mod, here you can see for example the stairs how they are NavMeshed, and many other things Link to comment Share on other sites More sharing options...
maxarturo Posted July 13, 2022 Share Posted July 13, 2022 Just keep in mind that there is a limit of how many NavMesh trits you can create in 1 cell, interior and exterior, but mainly interior because it's impossible to exceed the limit of 5127 on an exterior cell. Link to comment Share on other sites More sharing options...
Recommended Posts