Documentation
    Preparing search index...

    Interface SteeringNeighbor

    The read-only view of a neighbouring agent that flocking needs (§12).

    Structural, and deliberately smaller than SteeringContext: a neighbour contributes only where it is and how fast it is going, so anything with a position and a velocity — a SteeringAgent, a { position, velocity } literal, a physics body wrapper — is a neighbour without adapting to a class.

    readonly marks intent: no behaviour in this module ever mutates a neighbour's or a context's vectors. It cannot be enforced deeper — TypeScript readonly stops reassignment of the property, not mutation of the Vector3 it points at — so the guarantee is the implementation's, and is tested.

    interface SteeringNeighbor {
        position: Vector3;
        velocity: Vector3;
    }

    Hierarchy (View Summary)

    Index
    position: Vector3

    World position of the agent. Never mutated by a behaviour.

    velocity: Vector3

    World velocity in units per second. Never mutated by a behaviour.