fix physics animation jitter
This commit is contained in:
@ -63,7 +63,6 @@ auto main(int argc, char *argv[]) -> int {
|
||||
state.previous_state = state.current_state;
|
||||
input.HandleInput();
|
||||
state.UpdateGraph(); // Add state added after user input
|
||||
camera.Update(mass_springs.GetMass(state.current_state).position);
|
||||
|
||||
// Physics update
|
||||
#ifdef PRINT_TIMINGS
|
||||
@ -87,6 +86,9 @@ auto main(int argc, char *argv[]) -> int {
|
||||
physics_time_accumulator += pe - ps;
|
||||
#endif
|
||||
|
||||
// Update the camera after the physics, so target lock is smooth
|
||||
camera.Update(mass_springs.GetMass(state.current_state).position);
|
||||
|
||||
// Rendering
|
||||
#ifdef PRINT_TIMINGS
|
||||
std::chrono::high_resolution_clock::time_point rs =
|
||||
|
||||
Reference in New Issue
Block a user