Skip to content

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.

Vec2

readonly Neighbor[]

Vec2

number

Vec2