FANDOM


Back to PIA's main page

Cohesion V2











CohesionEdit

When COHESION is activated, a BOIDs will attempt to move towards the flock’s center of mass (the average of all BOIDs’ positions, except it's own position). When the Localize Rules parameter is set, the local center of mass is calculated by only considering those other BOIDs with the defined radius. Note that this is not the precisely same as being attracted to other BOIDs, but towards a point at the group's center.

Cohesion Graph

Activate COHESION RuleEdit

Check this box to active the rule.

Cohesion StrengthEdit

Adjust this value to influence the strength of cohesion. Higher values will force the BOIDs to stay close to the group’s center of mass.

Tips and LimitationsEdit

  1. If COHESION is deactivated, this parameter has no effect.
  2. A value of 1.0 is a "nominal" value. A value of 2.0 will create twice the force, while a value of 0.5 will create half the force.
  3. Negative values will have the opposite effect - forcing BOIDs to move away from the center of mass.
  4. The "Localize Rules" parameter works on this rule. When set, the center of mass for each BOID is calculated only based on those within the Localize Radius.

ExamplesEdit

Most animals are affected by cohesion - the desire to not move too far away from others of its kind.

For simulating some species that are "loners," set the Cohesion Strength parameter to a negative number (e.g., -0.5). 

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.