void ComputeForce() { force = Vector3.zero; for (int i = 0; i < behaviours.Count; i++) { Steering behaviour = behaviours[i]; if (behaviour.isActiveAndEnabled == false) { continue; } force = force + behaviour.GetForce() * behaviour.weighting; if (force.magnitude > maxVelocity) { force = force.normalized * maxVelocity; break; } } }