Skip to main content

flock_force

Function flock_force 

Source
pub fn flock_force(
    pos: Vec3,
    vel: Vec3,
    neighbors: &[FlockNeighbor],
    alignment: f32,
    cohesion: f32,
    separation: f32,
    radius: f32,
) -> Vec3
Expand description

Compute a steering force for one boid given its neighbors. Simplified version using just the three classic forces.