Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interpolation #640

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix interpolation #640

wants to merge 1 commit into from

Conversation

Jakkestt
Copy link

This commit fixes the issue where if the games refresh rate is longer than the fixed timestep configured in the engine, when there is more than 1 fixed update within an update, the interpolation struct would hold the same position twice, making interpolation useless. The way you fix this issue is that you put the systems that are in charge of updating the interpolation struct in the FixedUpdate schedule and you constantly keep the struct updated on the 2 latest positions. You then have to put the system that is in charge of interpolation in the PostUpdate schedule, because we want interpolated position within the current fixed update and the next fixed update.

@Vrixyz
Copy link
Contributor

Vrixyz commented Feb 28, 2025

Thanks! Do you have opinions about relying on other crates for interpolation ? Such as https://github.com/Jondolf/bevy_transform_interpolation.

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.

2 participants