You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #60945 from smix8/navmesh_bake_size_warning_4.x
Add Warning to NavigationMesh bake when source geometry is suspiciously big
This commit is contained in:
@@ -462,6 +462,14 @@ void NavigationMeshGenerator::_build_recast_navigation_mesh(
|
|||||||
#endif
|
#endif
|
||||||
rcCalcGridSize(cfg.bmin, cfg.bmax, cfg.cs, &cfg.width, &cfg.height);
|
rcCalcGridSize(cfg.bmin, cfg.bmax, cfg.cs, &cfg.width, &cfg.height);
|
||||||
|
|
||||||
|
// ~30000000 seems to be around sweetspot where Editor baking breaks
|
||||||
|
if ((cfg.width * cfg.height) > 30000000) {
|
||||||
|
WARN_PRINT("NavigationMesh baking process will likely fail."
|
||||||
|
"\nSource geometry is suspiciously big for the current Cell Size and Cell Height in the NavMesh Resource bake settings."
|
||||||
|
"\nIf baking does not fail, the resulting NavigationMesh will create serious pathfinding performance issues."
|
||||||
|
"\nIt is advised to increase Cell Size and/or Cell Height in the NavMesh Resource bake settings or reduce the size / scale of the source geometry.");
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
if (ep) {
|
if (ep) {
|
||||||
ep->step(TTR("Creating heightfield..."), 3);
|
ep->step(TTR("Creating heightfield..."), 3);
|
||||||
|
|||||||
Reference in New Issue
Block a user