---
title: NavigationComponent
framework: realitykit
role: symbol
role_heading: Structure
path: realitykit/navigationcomponent
---

# NavigationComponent

A component that defines which areas of a navigation mesh an entity can move through.

## Declaration

```swift
struct NavigationComponent
```

## Overview

Overview Add a navigation component to an entity to make it a navigation agent. Its layer selects the navigation mesh the entity travels on, and its filter restricts which marked areas the entity can cross when a NavigationController finds a path.

## Topics

### Creating a component

- [init(layer:filter:)](realitykit/navigationcomponent/init(layer:filter:).md)

### Configuring navigation

- [layer](realitykit/navigationcomponent/layer.md)
- [filter](realitykit/navigationcomponent/filter-swift.property.md)
- [NavigationComponent.Filter](realitykit/navigationcomponent/filter-swift.struct.md)

## Relationships

### Conforms To

- [Component](realitykit/component.md)

## See Also

### Game development

- [Gaming sample code projects](realitykit/game-development-sample-code.md)
- [Entity animations](realitykit/game-development-entity-animations.md)
- [Character control, skeletons, and inverse kinematics](realitykit/game-development-character-skeletons.md)
- [NavigationMeshComponent](realitykit/navigationmeshcomponent.md)
- [NavigationController](realitykit/navigationcontroller.md)
- [NavigationMeshResource](realitykit/navigationmeshresource.md)
