Skip to content

Commit

Permalink
Remember to interpolate angularVelocity
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjaltesorgenfrei committed Jan 26, 2024
1 parent 8bef670 commit f3193e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/engine/Physics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ void PhysicsWorld::update(float dt, entt::registry &registry) {
body.position = glm::mix(interpolation.current.position, interpolation.next.position, ratio);
body.rotation = glm::slerp(interpolation.current.rotation, interpolation.next.rotation, ratio);
body.linearVelocity = glm::mix(interpolation.current.linearVelocity, interpolation.next.linearVelocity, ratio);
body.angularVelocity = glm::mix(interpolation.current.angularVelocity, interpolation.next.angularVelocity, ratio);
body.scale = glm::mix(interpolation.current.scale, interpolation.next.scale, ratio);
});
}

0 comments on commit f3193e2

Please sign in to comment.