← Zurück zu LÖVE · Projektplanungspaket

Skill · Version 1.0.0

Unity-Navigation und Wahrnehmung

Verknüpft Wahrnehmung und Gedächtnis von Unity-NPCs mit erreichbarer Bewegung. Unterscheidet angeforderte von nutzbaren Wegen und begrenzt Neuplanung bei Hindernissen.

unity-npc-navigation-perception

Agenten mit diesem Skill

Entdecke, wie der Skill hilft

Wann ist der Skill hilfreich?

Nutze ihn bei feststeckenden Akteuren, unsichtbarer Zielverfolgung oder wiederholten unmöglichen Routen.

Wobei hilft er dir?

  • Unterscheidet ausstehende, gültige, teilweise und fehlgeschlagene Pfade.
  • Begrenzt Neuplanung und bestimmt eine Bewegungshoheit.
  • Koordiniert Sichtinformationen, Zielgedächtnis und Hindernisbehandlung.

Das könntest du fragen

Eine Unity-Wache will einen Spieler hinter einer verschlossenen Tür erreichen. Behandle ausstehende, teilweise und fehlgeschlagene Wege und wähle eine gültige Ersatzaktion anhand der letzten Sichtung. Öffne die Tür im Test: Die Wache soll reagieren, ohne jeden Frame neu zu planen oder doppelte Bewegungssteuerung zu verwenden.

Ausführliche Dokumentation

Hier findest du die ursprüngliche Anleitung, Beispiele und Prüfschritte des Skills in ihrer Originalsprache.

Details…Weniger anzeigen

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.

Enthaltene Dateien 1

  • SKILL.md