Skip to content

Interpolation over non FixedUpdate frames #6

Open
@Vrixyz

Description

@Vrixyz

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions