I have a simple navigation scene (that I was originally creating to try to reproduce a different bug), but when code that sets the navigation mesh on the navigation region runs, it closes the debug window (or whatever the window the game runs in is called) with no error.
Steps to reproduce
Here is the code on my NavigationRegion3D node -
extends NavigationRegion3D
@export var test := false
func _ready() :
if generate_mesh :
print("before generating mesh")
var _navigation_mesh := NavigationMesh.new()
var outline = PackedVector3Array([Vector3(-3.5, 0, -3.5), Vector3(-3.5, 0, 3.5), Vector3(3.5, 0, 3.5), Vector3(3.5, 0, -3.5)])
_navigation_mesh.set_vertices(outline)
_navigation_mesh.add_polygon([1,2,3,4])
navigation_mesh = _navigation_mesh
print("after generating mesh")
I have found through playing with breakpoints that the problem is definetely coming from the line
navigation_mesh = _navigation_mesh
Ok, It turns out I just forgot to zero index the indices when adding them to the list, but I still feel like it's a bug that it doesn't throw any errors?
Godot version
4.1 beta 3
System information
Windows 11
Issue description
I have a simple navigation scene (that I was originally creating to try to reproduce a different bug), but when code that sets the navigation mesh on the navigation region runs, it closes the debug window (or whatever the window the game runs in is called) with no error.
Steps to reproduce
Here is the code on my NavigationRegion3D node -
I have found through playing with breakpoints that the problem is definetely coming from the line
navigation_mesh = _navigation_mesh
Minimal reproduction project
Navigation Mesh MRP.zip