force.wallTurn

A soft turn back toward the canvas near an edge, so a flock arcs instead of bouncing.

force.wallTurn(layout: SteeringLayout): AgentSteer2

Import sim from shaders/std and use sim.agentForces.force.wallTurn.

Parameters

NameTypeNotes
layoutSteeringLayout

Example

forces: [force.flocking(simLayout, {maxAgents: 4096}), force.wallTurn(simLayout)]

See also

  • force.flocking — Separation, alignment and cohesion for a flock, with live weights and radii.