cohesion
cohesion(
pos,neighbors,vel,maxSpeed):Vec2
Defined in: src/modules/steering/steering.ts:160
Steer toward the average position (centre of mass) of neighbours.
Parameters
Section titled “Parameters”neighbors
Section titled “neighbors”readonly Neighbor[]
maxSpeed
Section titled “maxSpeed”number