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

Unify physics time APIs with Time<Physics> and Time<Substeps> #214

Merged
merged 14 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/benches_common_3d/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub fn bench_app<M: Measurement>(
PhysicsPlugins::default(),
));

app.insert_resource(PhysicsTimestep::FixedOnce(1.0 / 60.0));
app.insert_resource(Time::new_with(Physics::fixed_once_hz(1.0 / 60.0)));

setup(&mut app);

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_xpbd_3d/examples/basic_dynamic_character.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ fn movement(
// both the `f32` and `f64` features. Otherwise you don't need this.
let delta_time = time.delta_seconds_f64().adjust_precision();

for event in movement_event_reader.iter() {
for event in movement_event_reader.read() {
for (movement_acceleration, jump_impulse, mut linear_velocity, is_grounded) in
&mut controllers
{
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_xpbd_3d/examples/basic_kinematic_character.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ fn movement(
// both the `f32` and `f64` features. Otherwise you don't need this.
let delta_time = time.delta_seconds_f64().adjust_precision();

for event in movement_event_reader.iter() {
for event in movement_event_reader.read() {
for (movement_acceleration, jump_impulse, mut linear_velocity, is_grounded) in
&mut controllers
{
Expand Down
Loading