# Siatki nawigacyjne i odnajdywanie drogi

EN: **Navigation meshes and pathfinding** · id `navmesh` · aliases: navmesh, navigation mesh, pathfinding, siatka nawigacyjna, odnajdywanie ścieżek, Recast, crowd simulation

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [AI w grach](https://aiatlasgraph.com/t/gameai.md) › [Zachowanie postaci w grach](https://aiatlasgraph.com/t/gamecharacters.md) › Siatki nawigacyjne i odnajdywanie drogi

## Description

- PL: Reprezentacja przestrzeni chodzenia jako siatki wielokątów wypukłych, generowanej z geometrii poziomu, oraz wyszukiwanie ścieżek i unikanie kolizji na niej.
- EN: Representing walkable space as a mesh of convex polygons generated from level geometry, with pathfinding and collision avoidance on top.

## In one sentence

- PL: Mapa miejsc, po których postacie mogą chodzić, i sposób szukania na niej najkrótszej drogi omijającej przeszkody.
- EN: A map of the places characters can walk and a way to find the shortest route on it around obstacles.

## Problem it solves

- PL: Postacie wpadające na ściany, utykające w kątach albo tratujące się w tłumie od razu psują wrażenie gry.
- EN: Characters walking into walls, sticking in corners or trampling each other in crowds instantly ruin a game.

## What it does

- PL: Jak plan pieszych ścieżek w parku: zamiast liczyć każdy krok po trawie, łączy wolne płaty terenu i szuka drogi między nimi.
- EN: Like a park's footpath plan: instead of computing every step on the grass, it links open patches and routes between them.

## Everyday example

- PL: W grze strategicznej klikasz cel po drugiej stronie miasta, a oddział sam omija budynki, rzekę i inne jednostki.
- EN: In a strategy game you click a spot across town, and the squad walks around buildings, the river and other units on its own.

## This concerns you if you…

- PL: tworzysz grę, w której postacie się poruszają
- PL: budujesz symulację ruchu ludzi lub pojazdów
- EN: make a game where characters move around
- EN: build a simulation of people or vehicle movement

## Keywords

navigation mesh · Recast & Detour · A* pathfinding · funnel algorithm · RVO · ORCA · flow fields · hierarchical pathfinding · steering behaviors

## How it works

- PL: Generator wokselizuje geometrię poziomu, odrzuca miejsca zbyt strome lub niskie dla postaci i scala resztę w wielokąty. Algorytm A* szuka drogi po grafie wielokątów, a wynik wygładza się w prostą ścieżkę. W trakcie ruchu lokalne sterowanie omija inne postacie i dynamiczne przeszkody.
- EN: The generator voxelises level geometry, discards places too steep or low for characters and merges the rest into polygons. A* finds a route over the polygon graph, and the result is smoothed into a straight path. During movement, local steering avoids other characters and dynamic obstacles.

## Limits

- PL: Siatkę trzeba przeliczać, gdy świat się zmienia, co w dużych, zniszczalnych światach jest kosztowne. Postacie o różnych rozmiarach i sposobach ruchu potrzebują osobnych siatek. Gęste tłumy wciąż potrafią się zakleszczać.
- EN: The mesh must be rebuilt when the world changes, which is costly in large, destructible worlds. Characters of different sizes and movement types need separate meshes. Dense crowds can still jam.

## Key terms

- PL: **wokselizacja**: Zamiana geometrii na siatkę małych sześcianów.
- PL: **wygładzanie ścieżki**: Usuwanie zbędnych zakrętów z drogi wyznaczonej po wielokątach.
- PL: **unikanie kolizji**: Lokalne korekty ruchu, by nie wpaść na innych.
- EN: **voxelisation**: Turning geometry into a grid of small cubes.
- EN: **path smoothing**: Removing needless turns from a route found over polygons.
- EN: **collision avoidance**: Local movement corrections to avoid bumping into others.

## Know first

- [Przeszukiwanie heurystyczne (A*) (Heuristic search (A*))](https://aiatlasgraph.com/t/astar.md)

## Related topics

Untyped, symmetric "see also" links.

- [Mapy wpływów do decyzji taktycznych (Influence maps for tactical decisions)](https://aiatlasgraph.com/t/influencemaps.md)
- [Nawigacja robotów mobilnych (Mobile robot navigation)](https://aiatlasgraph.com/t/robotnav.md)
- [Planowanie tras wielu robotów bez kolizji (MAPF) (Multi-agent path finding (MAPF))](https://aiatlasgraph.com/t/mapf.md)
- [Przeszukiwanie heurystyczne (A*) (Heuristic search (A*))](https://aiatlasgraph.com/t/astar.md)
- [Symulacja stada (boids) (Boids and flocking simulation)](https://aiatlasgraph.com/t/boids.md)

## Sources

- [Recast Navigation — documentation](<https://recastnav.com/>) `recast-navigation-docs` · by projekt open source Recast & Detour

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/navmesh · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
