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

Update book visual interp page with fixed physics example #571

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

RJ
Copy link
Contributor

@RJ RJ commented Aug 7, 2024

Updated the visual interp book page. key insight is this bit:

Avian's SyncPlugin does this for you, but beware if you use FixedUpdate, you need to run the SyncPlugin in PostUpdate, otherwise you won't be syncing changes correctly. Visual interp happens in PostUpdate, even if physics runs in FixedUpdate.

// Run physics in FixedUpdate, but run the SyncPlugin in PostUpdate
app
  .add_plugins(
    PhysicsPlugins::new(FixedUpdate)
      .build()
      .disable::<SyncPlugin>(),
  )
  .add_plugins(SyncPlugin::new(PostUpdate));

@RJ RJ force-pushed the visual-interp-book branch from b142c19 to 5535cc1 Compare August 7, 2024 21:08
@cBournhonesque cBournhonesque added C-Book A change/improvement to the book A-Interpolation Related to snapshot interpolation labels Aug 7, 2024
@cBournhonesque cBournhonesque merged commit 3f79f2f into cBournhonesque:main Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Interpolation Related to snapshot interpolation C-Book A change/improvement to the book
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants