Open RedStorkKami opened 7 months ago
It's not a bug, it's a feature.
The method get_bounding_box()
return bounding box of the level geometry, but not of the navigation mesh. When you define navmesh from *.bin
file, then the geometry in fact is not defined. So, the result of getting bounding box is invalid. Under the hood when you call load_navmesh
, it init the geometry by simple plane (because it required to define some inner states of the new navmesh object). That's why it return the bounding box with the size +-6.0
.
Hello, I'm trying to figure out Detour and Recast. I have the following problem: when I run the code in this form, everything is fine, and the bounding box dimensions are as they should be:
navmesh_obj.get_bounding_box(): ((-5333.33349609375, -24.63961410522461, -533.3333129882812), (-4800.0, 175.50584411621094, 0.0))
If I try to load the Navmesh from a saved file, the box collapses for some reason, and the pathfinding doesn't work:
navmesh_obj.get_bounding_box(): ((-6.0, 0.0, -6.0), (6.0, 0.0, 6.0))
adt_41_32.bin is exist. It was created with code