navcat docs
    Preparing search index...

    Type Alias Agent

    type Agent = {
        boundary: LocalBoundary;
        corners: StraightPathPoint[];
        corridor: PathCorridor;
        desiredSpeed: number;
        desiredVelocity: Vec3;
        displacement: Vec3;
        neis: { agentId: string; dist: number }[];
        newVelocity: Vec3;
        obstacleAvoidanceDebugData: ObstacleAvoidanceDebugData | undefined;
        obstacleAvoidanceQuery: ObstacleAvoidanceQuery;
        offMeshAnimation:
            | {
                duration: number;
                endPosition: Vec3;
                nodeRef: NodeRef;
                startPosition: Vec3;
                t: number;
            }
            | null;
        params: AgentParams;
        position: Vec3;
        slicedQuery: SlicedNodePathQuery;
        state: AgentState;
        targetPathfindingTime: number;
        targetPathIsPartial: boolean;
        targetPosition: Vec3;
        targetRef: NodeRef
        | null;
        targetReplan: boolean;
        targetState: number;
        velocity: Vec3;
    }
    Index

    Properties

    boundary: LocalBoundary

    Local boundary for obstacle avoidance

    Steering corners extracted from the corridor

    corridor: PathCorridor

    Path corridor for navigation

    desiredSpeed: number

    Desired speed magnitude

    desiredVelocity: Vec3

    Desired velocity from steering

    displacement: Vec3

    Displacement vector for collision resolution

    neis: { agentId: string; dist: number }[]

    Neighboring agents within collision query range

    newVelocity: Vec3

    Planned velocity after obstacle avoidance

    obstacleAvoidanceDebugData: ObstacleAvoidanceDebugData | undefined

    Debug data for obstacle avoidance visualization

    obstacleAvoidanceQuery: ObstacleAvoidanceQuery

    Obstacle avoidance query for velocity planning

    offMeshAnimation:
        | {
            duration: number;
            endPosition: Vec3;
            nodeRef: NodeRef;
            startPosition: Vec3;
            t: number;
        }
        | null

    Off-mesh connection animation state (null when not traversing an off-mesh connection)

    params: AgentParams

    Agent configuration parameters

    position: Vec3

    Current position in world space

    slicedQuery: SlicedNodePathQuery

    Sliced pathfinding query state

    state: AgentState

    The current state of the agent

    targetPathfindingTime: number

    Time spent pathfinding to current target

    targetPathIsPartial: boolean

    True if pathfinding returned a partial result (best-effort path)

    targetPosition: Vec3

    Target position

    targetRef: NodeRef | null

    Target polygon reference

    targetReplan: boolean

    Whether the agent needs to replan its path to the target

    targetState: number

    AgentTargetState

    velocity: Vec3

    Current velocity