NavMeshComponent struct in Thread
Holds the scene's baked grid navmesh. Place one on a "navigation" entity and bake it from
the editor (AI ▸ Bake) or via Navigation::Bake. The bake settings are serialized;
the baked NavMesh is runtime-only and rebuilt on demand. A scene is expected to
have at most one enabled NavMeshComponent — the navigation system uses the first it finds.
Properties
| Settings | NavBakeSettings | Cell size, agent radius/height, max slope, bounds — how the grid is voxelised. |
| Enabled | bool | Master switch. |
| Baked | std::shared_ptr<NavMesh> | Runtime-only; nullptr until baked. |
How it fits together
The navmesh is baked from the scene's static geometry and terrain into a walkable grid. Agents (NavAgentComponent) query it for A* paths, which are string-pulled into smooth waypoint lists. Obstacles bake as walkable roofs in this v1 grid baker.
NavMeshComponent struct w Thread
Przechowuje wypieczony siatkowy navmesh sceny. Umieść go na encji „nawigacji” i wypiecz z
edytora (AI ▸ Bake) albo przez Navigation::Bake. Ustawienia wypiekania są
zapisywane; sam NavMesh istnieje tylko w czasie działania i jest odbudowywany na
żądanie. Scena powinna mieć najwyżej jeden włączony NavMeshComponent — system nawigacji używa
pierwszego, jaki znajdzie.
Właściwości
| Settings | NavBakeSettings | Rozmiar komórki, promień/wysokość agenta, maks. nachylenie, granice — jak siatka jest wokselizowana. |
| Enabled | bool | Główny przełącznik. |
| Baked | std::shared_ptr<NavMesh> | Tylko w czasie działania; nullptr do czasu wypieczenia. |
Jak to się łączy
Navmesh jest wypiekany ze statycznej geometrii i terenu sceny do siatki pól, po których da się chodzić. Agenci (NavAgentComponent) pytają go o ścieżki A*, wygładzane metodą „string pulling” do listy punktów. W tym bakerze v1 przeszkody wypiekają się jako dachy, po których można chodzić.