Recast.js
    Preparing search index...

    Interface FlockGroupOptions

    interface FlockGroupOptions {
        agentIds?: number[];
        cohesionWeight?: number;
        alignmentWeight?: number;
        cohesionRadius?: number;
    }
    Index

    Properties

    agentIds?: number[]

    Initial agent IDs to include in the flock.

    cohesionWeight?: number

    Weight of the cohesion force pulling each agent toward the group centroid. Default: 0.5

    alignmentWeight?: number

    Weight of the alignment force nudging each agent toward the average heading. Default: 0.0 (disabled)

    cohesionRadius?: number

    Maximum distance from the centroid within which cohesion is applied. Agents farther than this are not pulled in. Default: Infinity.