diff --git a/Cargo.toml b/Cargo.toml index 3d7d57a..8bac2b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ wgpu-hal = "0.17.1" [dev-dependencies] bevy = "0.12" color-eyre = "0.6.2" -bevy_rapier3d = { git = "https://github.com/alexichepura/bevy_rapier", version = "0.22.0", branch = "bevy-012"} +bevy_rapier3d = { git = "https://github.com/devil-ira/bevy_rapier", branch = "bevy-0.12" } [[example]] name = "xr" diff --git a/examples/demo/src/main.rs b/examples/demo/src/main.rs index ffb0b67..df2a8cb 100644 --- a/examples/demo/src/main.rs +++ b/examples/demo/src/main.rs @@ -1,4 +1,4 @@ -use std::{f32::consts::PI, ops::Mul}; +use std::{f32::consts::PI, ops::Mul, time::Duration}; use bevy::{ diagnostic::{FrameTimeDiagnosticsPlugin, LogDiagnosticsPlugin}, @@ -6,12 +6,12 @@ use bevy::{ log::info, prelude::{ default, shape, App, Assets, Color, Commands, Component, Entity, Event, EventReader, - EventWriter, FixedTime, FixedUpdate, GlobalTransform, IntoSystemConfigs, + EventWriter, FixedUpdate, GlobalTransform, IntoSystemConfigs, IntoSystemSetConfigs, Mesh, PbrBundle, PostUpdate, Quat, Query, Res, ResMut, Resource, Schedule, SpatialBundle, StandardMaterial, Startup, Transform, Update, Vec3, With, Without, World, Vec3Swizzles, }, - time::{Time, Timer}, + time::{Time, Timer, Fixed}, transform::TransformSystem, }; use bevy_openxr::{ @@ -129,7 +129,7 @@ fn main() { .in_set(PhysicsSet::Writeback), )); app.add_schedule(physics_schedule) // configure our fixed timestep schedule to run at the rate we want - .insert_resource(FixedTime::new_from_secs(FIXED_TIMESTEP)) + .insert_resource(Time::::from_duration(Duration::from_secs_f32(FIXED_TIMESTEP))) .add_systems(FixedUpdate, run_physics_schedule) .add_systems(Startup, configure_physics); app.run(); @@ -328,7 +328,7 @@ fn update_physics_hands( &mut Velocity, )>, hand_query: Query<(&Transform, &HandBone, &Hand, Without)>, - time: Res, + time: Res