Skip to content

Commit

Permalink
fix(flocking): add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tolstenko committed Sep 7, 2023
1 parent 68ba47f commit c35fb48
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/flocking/gameobjects/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ World::World(Engine* pEngine) : GameObject(pEngine) {}

void World::initializeRules() {
// Starting Rules
// parameters: desired separation, weight
boidsRules.emplace_back(std::make_unique<SeparationRule>(this, 25.f, 4.75f));
// parameters: weight
boidsRules.emplace_back(std::make_unique<CohesionRule>(this, 4.25f));
// parameters: weight
boidsRules.emplace_back(std::make_unique<AlignmentRule>(this, 2.9f));
// parameters: weight
boidsRules.emplace_back(std::make_unique<MouseInfluenceRule>(this, 2.f));
// parameters: distance from frame border, weight
boidsRules.emplace_back(std::make_unique<BoundedAreaRule>(this, 20, 8.f, false));
// parameters: weight, angle
boidsRules.emplace_back(std::make_unique<WindRule>(this, 1.f, 6.f, false));

// Starting weights are saved as defaults
Expand Down

0 comments on commit c35fb48

Please sign in to comment.