Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | CCX |
Hi, I’m working on a project that has an in-game editor that places structures (walls etc).
I want it so that if I place down (for example) a wall, the navmesh
will update and remove the part occupied by the wall.
Currently, I have a function that will calculate the vertices around the area that I want the navmesh to exclude out and append it to an new_navmesh_vertex_list
array (An array containing the vertices of the original navmesh).
However, when I do:
var navmesh = $Navigation/NavigationMeshInstance.navmesh
// Calcuations
navmesh.set_vertices(new_navmesh_vertex_list)
navmeshinstance.navmesh = navmesh
The navmesh looks unchanged. Then I used Immediate Geometry node to create some lines connecting the vertices in the navmesh to confirm that the navmesh does indeed have the new vertices.
Now my question is how does one remove part of a navmesh and update it correctly? Is there something I did wrong? Is there a specific order for the new_navmesh_vertex_list
for the navmesh to remove the specified part?
Also I’m new here