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

Interpolation is broken. #638

Open
Jakkestt opened this issue Feb 26, 2025 · 0 comments
Open

Interpolation is broken. #638

Jakkestt opened this issue Feb 26, 2025 · 0 comments

Comments

@Jakkestt
Copy link

The way that interpolation is implemented currently is broken. It works fine when the games refresh rate is equal or greater than the fixed timestep of the engine. But if the refresh rate is less than the timestep, you will eventually start getting frames where 2 or more fixed updates happen. The way that the interpolation works currently is that the start and end fields of the TransformInterpolation struct get set to the RigidBody's position. The problem comes when both of these fields have to be updated on the same frame. Both of the fields get set to the same Transform which means that you cannot get interpolated values from the TransformInterpolation struct. The fix for this would be to use FixedUpdate schedule for the physics systems to make sure that the systems can get all of the transform changes. That being said we the interpolation has to still happen at the same rate as the game's refresh rate which means that the systems that are responsible for doing the interpolation would have to stay in PostUpdate.

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

No branches or pull requests

1 participant