You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add 2D navigation mesh baking
Adds 2D navigation mesh baking.
This commit is contained in:
@@ -1086,6 +1086,14 @@ void GodotNavigationServer::map_force_update(RID p_map) {
|
||||
map->sync();
|
||||
}
|
||||
|
||||
void GodotNavigationServer::sync() {
|
||||
#ifndef _3D_DISABLED
|
||||
if (navmesh_generator_3d) {
|
||||
navmesh_generator_3d->sync();
|
||||
}
|
||||
#endif // _3D_DISABLED
|
||||
}
|
||||
|
||||
void GodotNavigationServer::process(real_t p_delta_time) {
|
||||
flush_queries();
|
||||
|
||||
@@ -1093,16 +1101,6 @@ void GodotNavigationServer::process(real_t p_delta_time) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
// Sync finished navmesh bakes before doing NavMap updates.
|
||||
if (navmesh_generator_3d) {
|
||||
navmesh_generator_3d->sync();
|
||||
// Finished bakes emit callbacks and users might have reacted to those.
|
||||
// Flush queue again so users do not have to wait for the next sync.
|
||||
flush_queries();
|
||||
}
|
||||
#endif // _3D_DISABLED
|
||||
|
||||
int _new_pm_region_count = 0;
|
||||
int _new_pm_agent_count = 0;
|
||||
int _new_pm_link_count = 0;
|
||||
|
||||
Reference in New Issue
Block a user