Unity-navigáció és érzékelés
Elérhető mozgással kapcsolja össze a Unity-szereplő érzékelését és emlékezetét. Megkülönbözteti a kért és használható útvonalat, és korlátozza az akadály miatti újratervezést.
unity-npc-navigation-perception
Ezt a skillt használó ügynökök
Mikor hasznos?
Akkor használd, ha szereplő elakad, láthatatlan célt üldöz vagy újra és újra lehetetlen helyre kér útvonalat.
Miben segít neked?
- Elkülöníti a függő, érvényes, részleges és hibás útvonalat.
- Korlátozza az újratervezést és egy mozgásgazdát jelöl ki.
- Összehangolja a látótér tényét, célmemóriát és akadálykezelést.
Például ezt kérheted
Egy Unity-őr zárt ajtó mögötti játékoshoz próbál eljutni. Kezeld a várakozó, részleges és hibás útvonalat, őrizd az utolsó látott helyet, és válassz érvényes tartalékakciót. Teszt közben nyisd ki az ajtót: az őr térjen magához képkockánkénti útkeresés és egymással versengő animációs-navigációs mozgás nélkül.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
NPC Navigation and Perception
Inspect the world and motor
Check the installed AI Navigation version, surface baking setup, agent types/radius/height, area costs, layers, links and obstacles. Identify movement authority and whether the world changes at runtime. Inspect the actual scene geometry and baked data before treating every stuck NPC as a decision-logic defect.
Navigation contracts
- Distinguish path request, pending computation, valid/partial/invalid result, traversal and arrival. Evaluate stopping distance and movement/velocity under valid path state rather than reading a single distance property as proof of arrival.
- Validate destinations and explicitly handle unreachable, disconnected or changing targets. Bound replanning rate and retries, with backoff and a useful fallback instead of requesting a path every frame forever.
- Coordinate NavMeshAgent updates, custom steering, Rigidbody/CharacterController and root motion. One system owns movement; off-mesh traversal must hand authority back safely after completion or cancellation.
- Model dynamic obstacles and crowd avoidance with the project's actual capabilities. Keep local avoidance separate from global path choice and test doors, chokepoints and moving blockers.
Perception and memory
Specify vision range/FOV, occlusion layers, hearing rules, update frequency and memory expiry. Use distance/angular filtering before expensive scene queries where appropriate. Distinguish current perception from last-known position; an obscured target should not update its remembered position through an unrelated global reference.
Budget sensor and path requests across many NPCs. Keep shared alerts explicit and limit who receives them. Handle sensor origin offsets, self-colliders, triggers and target despawn to avoid misleading line-of-sight results.
Verification
Reproduce spawn off-mesh, pending/partial paths, target behind a wall, lost target, moving obstacle, blocked link, interrupted traversal and crowd congestion. Debug-draw sensors, known positions, paths and failure reasons. Report target scene/package version, observed recovery and profiling evidence.
Reference: version-matched Unity AI Navigation and NavMeshAgent API. Use Craig Reynolds's steering paper to reason about local movement independently from action selection.
Csomagban lévő fájlok 1
SKILL.md
