-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
Allow customizing the schedule with FixedUpdate #385
Conversation
Should've made this a draft, shouldn't merge this until 0.11 as it isn't currently possible to use |
Thank you for this PR! Based on your comment I converted it to a draft. Feel free to un-draft it once it’s ready with bevy 0.11. |
// Warn user if the timestep mode isn't in Fixed | ||
if self.schedule.as_dyn_eq().dyn_eq(FixedUpdate.as_dyn_eq()) { | ||
let config = app.world.resource::<RapierConfiguration>(); | ||
match config.timestep_mode { | ||
TimestepMode::Fixed { .. } => {} | ||
mode => { | ||
warn!("TimestepMode is set to `{:?}`, it is recommended to use `TimestepMode::Fixed` if you have the physics in `FixedUpdate`", mode); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we automatically set it to fixed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m fine with the warning for now.
Thanks! I just renamed |
Fixes #355
Adds common usage of plugin to adding to
FixedUpdate
, otherwise the simulation will run too fast in the scenario that we run based onTimestepMode::Fixed
.