ecspresso
    Preparing search index...

    Interface FlockingAgent

    Configures flocking behavior for a boid entity.

    Entities with this component must also have:

    • localTransform + worldTransform (transform plugin)
    • velocity + force + rigidBody (physics2D plugin)
    • circleCollider with radius >= perceptionRadius (for spatial index queries)
    interface FlockingAgent {
        alignmentWeight: number;
        cohesionWeight: number;
        flockGroup: number;
        maxForce: number;
        maxSpeed: number;
        perceptionRadius: number;
        separationWeight: number;
    }
    Index

    Properties

    alignmentWeight: number

    Alignment weight — match average heading of neighbors (default: 1.0)

    cohesionWeight: number

    Cohesion weight — steer toward average position of neighbors (default: 1.0)

    flockGroup: number

    Flock group ID for independent flocks (default: 0)

    maxForce: number

    Maximum steering force magnitude per frame

    maxSpeed: number

    Maximum velocity magnitude (hard speed cap)

    perceptionRadius: number

    Radius within which neighbors are detected

    separationWeight: number

    Separation weight — steer away from nearby neighbors (default: 1.5)