Skip to content

Commit

Permalink
fix(physics): fix type error by adding gravity plugin after adding co…
Browse files Browse the repository at this point in the history
…mponents
  • Loading branch information
fallenatlas committed Feb 1, 2024
1 parent 1c7cfc8 commit 1e8553d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/src/cubos/engine/physics/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ static bool simulatePhysicsStep(PhysicsAccumulator& accumulator, const FixedDelt

void cubos::engine::physicsPlugin(Cubos& cubos)
{
cubos.addPlugin(gravityPlugin);

cubos.addResource<FixedDeltaTime>();
cubos.addResource<Substeps>();
cubos.addResource<PhysicsAccumulator>();
Expand All @@ -70,6 +68,8 @@ void cubos::engine::physicsPlugin(Cubos& cubos)
cubos.addComponent<AccumulatedCorrection>();
cubos.addComponent<PreviousPosition>();

cubos.addPlugin(gravityPlugin);

// executed every frame
cubos.system("increase fixed-step accumulator")
.tagged("cubos.physics.simulation.prepare")
Expand Down

0 comments on commit 1e8553d

Please sign in to comment.