Skip to content

Commit

Permalink
fix(physics): always add Inertia component when unpacking PhysicsBundle
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenatlas committed Sep 15, 2024
1 parent d939cfe commit f14ec5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engine/src/physics/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ void cubos::engine::physicsPlugin(Cubos& cubos)
.inverseInertia = glm::inverse(bundle.inertiaTensor),
.autoUpdate = false});
}
else
{
cmds.add(

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

View check run for this annotation

Codecov / codecov/patch

engine/src/physics/plugin.cpp#L190

Added line #L190 was not covered by tests
ent,
Inertia{.inertia = glm::mat3(0.0F), .inverseInertia = glm::mat3(0.0F), .autoUpdate = true});
}
cmds.add(ent, Velocity{.vec = bundle.velocity});
cmds.add(ent, AngularVelocity{.vec = bundle.angularVelocity});
cmds.add(ent, force);
Expand Down

0 comments on commit f14ec5a

Please sign in to comment.