![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | LukeDassonville |
Hello -
I recently changed my top down game from 2d to 3d, which went pretty smoothly as nearly all the code could stay the same. The one exception to this is the navigation. When it was in 2d, I made a script to update the navigation polygon whenever a new thing that needed to be avoided was added. The script was fast, and worked pretty well.
I would like to be able to use this same script, or something similar, to update the 3d navmesh as well, but I wasn’t able to find any way to do this. I did find a way to turn a navigation polygon into a navmesh with get_mesh(), but was unsuccessful at actually using the resulting mesh.
Is it possible to manually make and set a navigation mesh?
Thanks!
Update - I have been able to set the navmesh with either add_polygon or create_from_mesh. However, I am still having problems with both of these methods. The first is that the navigation Agent seems to get stuck on some of the edges between triangles, and the second is that the navmesh doesn’t show in game even if the show_navigation debug option is turned on.
LukeDassonville | 2022-11-03 05:03