Skip to content

Commit

Permalink
fix: Fixed delta time not used in some physics systems
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomanita committed Nov 19, 2024
1 parent 35720aa commit 37b1771
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion engine/samples/collisions/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ int main(int argc, char** argv)

cubos.system("move colliders")
.tagged(physicsApplyForcesTag)
.before(transformUpdateTag)
.call(
[](State& state, const Options& options, const Input& input, Query<Position&, Rotation&, Velocity&> query) {
auto [aPos, aRot, aVel] = *query.at(state.a);
Expand Down
2 changes: 1 addition & 1 deletion engine/samples/voxel-shape-collisions/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ int main()
});

cubos.system("move colliders")
.before(transformUpdateTag)
.tagged(physicsApplyForcesTag)
.call([](State& state, Query<Position&, Rotation&, Velocity&> query) {
auto [aPos, aRot, aVel] = *query.at(state.a);
auto [bPos, bRot, bVel] = *query.at(state.b);
Expand Down
2 changes: 1 addition & 1 deletion engine/src/physics/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,5 @@ void cubos::engine::physicsPlugin(Cubos& cubos)
}
});

cubos.tag(physicsApplyForcesTag);
cubos.tag(physicsApplyForcesTag).tagged(fixedStepTag);

Check warning on line 241 in engine/src/physics/plugin.cpp

View check run for this annotation

Codecov / codecov/patch

engine/src/physics/plugin.cpp#L241

Added line #L241 was not covered by tests
}

0 comments on commit 37b1771

Please sign in to comment.