Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

ChaseTrait

const ChaseTrait: Trait<{ reach: number; reached: Entity | null; speed: number; target: Entity | null; targets: () => TargetFilter; }>

Moves toward the nearest of its targets at speed, or toward the target its game sets, stopping reach away: along the world’s navmesh, and through the character controller on any tick it needs physics or where its movementMode is Walking. reached holds the target within reach, or null: the step emits ChaseReachedEvent and ChaseExitedEvent on the step it changes.