One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

NavigationController

struct · iOS 27.0+ · SDK 27.1

struct NavigationController

Members (8)

method · iOS 27.0+

computePath

TypeScript
computePathTo(targetPosition: SDKHandle): Promise<(Array<NavigationMeshResource_PathNode>) | null>
Swift declaration
func computePath(to targetPosition: SIMD3<Float>) async -> [NavigationMeshResource.PathNode]?

Asynchronously requests a pathfind from the owning entity's position to the target position and waits for the path or a failure. If the function returns an empty path, the pathfind succeeded with no nodes (for example, the start and end positions are in the same place). If the function returns nil, the pathfinding failed to find a path.

method · iOS 27.0+

computePath

TypeScript
computePathFromTo(startPosition: SDKHandle, targetPosition: SDKHandle): Promise<(Array<NavigationMeshResource_PathNode>) | null>
Swift declaration
func computePath(from startPosition: SIMD3<Float>, to targetPosition: SIMD3<Float>) async -> [NavigationMeshResource.PathNode]?

Asynchronously requests a pathfind from a given position to the target position and waits for the path or a failure. If the function returns an empty path, the pathfind succeeded with no nodes (for example, the start and end positions are in the same place). If the function returns nil, the pathfinding failed to find a path.

get · iOS 27.0+

currentPath

TypeScript
get currentPath(): Array<NavigationMeshResource_PathNode>
Swift declaration
var currentPath: [NavigationMeshResource.PathNode] { get }

The computed path to the target position found by requestPath(). If called before the pathfind completes, a partial path will be returned. This partial path may be suboptimal. If the pathfind failed or was not requested, the function will return an empty array.

method · iOS 27.0+

requestPath

TypeScript
requestPathTo(targetPosition: SDKHandle): void
Swift declaration
func requestPath(to targetPosition: SIMD3<Float>)

Requests a pathfind from the owning entity's position to the target position.

method · iOS 27.0+

requestPath

TypeScript
requestPathFromTo(startPosition: SDKHandle, targetPosition: SDKHandle): void
Swift declaration
func requestPath(from startPosition: SIMD3<Float>, to targetPosition: SIMD3<Float>)

Requests a pathfind from a given position to the target position.

method · iOS 27.0+

stopPathfind

TypeScript
stopPathfind(): void
Swift declaration
func stopPathfind()

Cancels any in-progress pathfinds.

get · iOS 27.0+

pathfindStatus

TypeScript
get pathfindStatus(): NavigationController_PathfindStatus
Swift declaration
var pathfindStatus: NavigationController.PathfindStatus { get }

The current pathfind status.

init · iOS 27.0+

init

TypeScript
static init(entity: Entity): NavigationController
Swift declaration
init(entity: Entity) throws

Creates a NavigationController from an Entity with a NavigationComponent.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →