Skip to content

fix: TickInterpolator glitch on state switch#301

Merged
elementbound merged 1 commit intomainfrom
fix/tickinterpolator-glitch
Oct 15, 2024
Merged

fix: TickInterpolator glitch on state switch#301
elementbound merged 1 commit intomainfrom
fix/tickinterpolator-glitch

Conversation

@elementbound
Copy link
Copy Markdown
Contributor

At the end of the tick loop, TickInterpolator catches the new state and starts interpolating towards it. However, between NetworkTime.after_tick_loop and the next TickInterpolator._process callback, there may be a single frame where the interpolated node(s) are still in the target state, and then get set back to the starting state once the interpolation kicks in. This leads to a periodic glitching.

To fix this, TickInterpolator always applies the starting state once it's captured, in NetworkTime.after_tick_loop.

Closes #287

@elementbound elementbound merged commit 99f6e92 into main Oct 15, 2024
@elementbound elementbound deleted the fix/tickinterpolator-glitch branch October 15, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interpolation glitches weirdly for 2d movement.

1 participant