Closed smix8 closed 1 year ago
When doing
NavigationServer3D.bake_from_source_geometry_data()
I always get "NavigationMeshSourceGeometryData3D is empty. Parse source geometry first."
I used the callable from parse_source_geometry_data() and tried with both Static Colliders and Mesh Instances
Tried with the CSGCombiner, same as you. If I add a StaticBody the error disappears because it finally finds some geometry but if there are only CSGs in neither mode I get anything.
As mentioned in the other open issue the problem in venilark's project was that the parsing was done in a _ready() function.
The SceneTree is not done with all the nodes setups when a _ready()
function in a node gets called, use call_deferred()
. Some node types like TileMap or GridMap do their setups deferred themself so you need to wait a frame for them to be truly ready.
Godot version
Godot 4.1
System information
Windows 10
Issue description
The source geometry parsing for the navigation mesh baking only adds mesh geometry from CSGShape3D when set to NavigationMesh::PARSED_GEOMETRY_MESH_INSTANCES or PARSED_GEOMETRY_BOTH.
The parsing ignores CSG shapes with
use_collision
enabled when set to PARSED_GEOMETRY_STATIC_COLLIDERS. The parsing also ignores thecollision_layers
bitmask in all cases.Steps to reproduce
Add
CSGShape3D
withuse_collision
enabled and set the NavigationMesh toPARSED_GEOMETRY_STATIC_COLLIDERS
.Minimal reproduction project
N/A