Skip to content

Interpolation over non FixedUpdate frames #6

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

Open
Vrixyz opened this issue Dec 18, 2024 · 0 comments · May be fixed by #7
Open

Interpolation over non FixedUpdate frames #6

Vrixyz opened this issue Dec 18, 2024 · 0 comments · May be fixed by #7

Comments

@Vrixyz
Copy link

Vrixyz commented Dec 18, 2024

The intended way is to modify fixed update to match the simulation time as best as we can.

What I dislike about this is that we're still tied to the framerate, and I don't know when my fixed update will run. they are not part of a schedule.

Currently my implementation still runs in fixed update, but the simulation step is read "when done", which results in non-predictible "render frame" to "fixed frame" relation. We could mitigate that by explicitly waiting, but that's another subject.

A few ideas I plan to explore:

  • be able to customize when the systems currently hardcoded in FixedLast and FixedFirst happen ?
  • make a specific schedule which is run only when the simulation takes place? (a set is not enough because it would be run regardless ?
  • User sends an event/trigger/system to signify an update frame has been computed.
  • add a run condition on sets ; I think that doesn´t work with the FixedTime handling.

I think the best option is a custom scheduler with custom Time, like the Time<Physics> of Avian, but this crate should be able to play well with it if Time<Fixed> and Time<Physics> deviate, which is not the case for Avian with interpolation support (Time<Physics> is an alias to underlying time (Fixed for interpolation support)

@Vrixyz Vrixyz changed the title Interpolation through multiple frames Interpolation over non FixedUpdate frames Dec 18, 2024
@Vrixyz Vrixyz linked a pull request Dec 24, 2024 that will close this issue
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 a pull request may close this issue.

1 participant