From c0be012b9dcc6a501a87aff9b7eafb3d886d8c9e Mon Sep 17 00:00:00 2001 From: ForTehLose Date: Wed, 4 Dec 2024 13:51:43 -0500 Subject: [PATCH 1/6] moved default bindings for tracking utils into a pub function for prototyping, while I work on better solution --- crates/bevy_openxr/examples/tracking_utils.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/bevy_openxr/examples/tracking_utils.rs b/crates/bevy_openxr/examples/tracking_utils.rs index 7f79a54..c159d38 100644 --- a/crates/bevy_openxr/examples/tracking_utils.rs +++ b/crates/bevy_openxr/examples/tracking_utils.rs @@ -1,11 +1,10 @@ //! A simple 3D scene with light shining over a cube sitting on a plane. use bevy::prelude::*; -use bevy_mod_openxr::add_xr_plugins; -use bevy_mod_xr::session::{XrSessionCreated, XrTrackingRoot}; +use bevy_mod_openxr::{action_binding::OxrSendActionBindings, add_xr_plugins}; +use bevy_mod_xr::session::XrSessionCreated; use bevy_xr_utils::tracking_utils::{ - TrackingUtilitiesPlugin, XrTrackedLeftGrip, XrTrackedLocalFloor, XrTrackedRightGrip, - XrTrackedStage, XrTrackedView, + suggest_action_bindings, TrackingUtilitiesPlugin, XrTrackedLeftGrip, XrTrackedLocalFloor, XrTrackedRightGrip, XrTrackedStage, XrTrackedView }; fn main() { @@ -18,6 +17,8 @@ fn main() { //tracking utils plugin app.add_plugins(TrackingUtilitiesPlugin); + //default bindings only use for prototyping + app.add_systems(OxrSendActionBindings, suggest_action_bindings); app.run(); } From a260443a0d5dfba90449ded1b249b0b8992723e0 Mon Sep 17 00:00:00 2001 From: ForTehLose Date: Wed, 4 Dec 2024 13:55:27 -0500 Subject: [PATCH 2/6] adding a missed change --- crates/bevy_xr_utils/src/tracking_utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bevy_xr_utils/src/tracking_utils.rs b/crates/bevy_xr_utils/src/tracking_utils.rs index e5a77ed..7019d32 100644 --- a/crates/bevy_xr_utils/src/tracking_utils.rs +++ b/crates/bevy_xr_utils/src/tracking_utils.rs @@ -54,7 +54,7 @@ impl Plugin for TrackingUtilitiesPlugin { ); //bindings - app.add_systems(OxrSendActionBindings, suggest_action_bindings); + // app.add_systems(OxrSendActionBindings, suggest_action_bindings); //sync actions app.add_systems( PreUpdate, @@ -200,7 +200,7 @@ fn update_right_grip( //tracking rig #[derive(Resource)] -struct ControllerActions { +pub struct ControllerActions { set: openxr::ActionSet, left: openxr::Action, right: openxr::Action, @@ -240,7 +240,7 @@ fn spawn_tracking_rig( //bindings //TODO figure out how to make these better, specifically not be controller specific -fn suggest_action_bindings( +pub fn suggest_action_bindings( actions: Res, mut bindings: EventWriter, ) { From 5b7db58fe6874370a3b8b832145b3f06ff3f3036 Mon Sep 17 00:00:00 2001 From: ForTehLose Date: Wed, 4 Dec 2024 14:03:31 -0500 Subject: [PATCH 3/6] making controller actions fields pub so users can use them --- crates/bevy_xr_utils/src/tracking_utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bevy_xr_utils/src/tracking_utils.rs b/crates/bevy_xr_utils/src/tracking_utils.rs index 7019d32..5f16730 100644 --- a/crates/bevy_xr_utils/src/tracking_utils.rs +++ b/crates/bevy_xr_utils/src/tracking_utils.rs @@ -201,9 +201,9 @@ fn update_right_grip( //tracking rig #[derive(Resource)] pub struct ControllerActions { - set: openxr::ActionSet, - left: openxr::Action, - right: openxr::Action, + pub set: openxr::ActionSet, + pub left: openxr::Action, + pub right: openxr::Action, } fn spawn_tracking_rig( From 8c5da2e5051b7ec47e745e12a6f3ae752500fd53 Mon Sep 17 00:00:00 2001 From: Schmarni Date: Wed, 11 Dec 2024 23:07:25 +0100 Subject: [PATCH 4/6] bump version Signed-off-by: Schmarni --- Cargo.toml | 2 +- crates/bevy_openxr/Cargo.toml | 2 +- crates/bevy_xr_utils/Cargo.toml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6f11ce4..d1e0fa1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.1.0-rc2" +version = "0.1.0" edition = "2021" description = "Community crate for XR in Bevy" repository = "https://github.com/awtterpip/bevy_oxr" diff --git a/crates/bevy_openxr/Cargo.toml b/crates/bevy_openxr/Cargo.toml index 514ee8d..a986d19 100644 --- a/crates/bevy_openxr/Cargo.toml +++ b/crates/bevy_openxr/Cargo.toml @@ -31,7 +31,7 @@ openxr = "0.18.0" thiserror = "1.0.57" wgpu = "0.20" wgpu-hal = "0.21" -bevy_mod_xr = { path = "../bevy_xr", version = "0.1.0-rc1" } +bevy_mod_xr = { path = "../bevy_xr", version = "0.1.0" } ash = { version = "0.37.3", optional = true } diff --git a/crates/bevy_xr_utils/Cargo.toml b/crates/bevy_xr_utils/Cargo.toml index ff299fa..d4805be 100644 --- a/crates/bevy_xr_utils/Cargo.toml +++ b/crates/bevy_xr_utils/Cargo.toml @@ -10,8 +10,8 @@ description = "utils for bevy_mod_xr and bevy_mod_openxr" [dependencies] bevy = { workspace = true, features = ["bevy_gizmos"] } -bevy_mod_xr = { path = "../bevy_xr", version = "0.1.0-rc1" } -bevy_mod_openxr = { path = "../bevy_openxr", version = "0.1.0-rc1" } +bevy_mod_xr = { path = "../bevy_xr", version = "0.1.0" } +bevy_mod_openxr = { path = "../bevy_openxr", version = "0.1.0" } [target.'cfg(not(target_family = "wasm"))'.dependencies] openxr = "0.18.0" From 361199e2c431517552bb138ffc56715d86141d2c Mon Sep 17 00:00:00 2001 From: Schmarni Date: Sat, 14 Dec 2024 02:01:31 +0100 Subject: [PATCH 5/6] fix hand tracker spawn side bug Signed-off-by: Schmarni --- Cargo.lock | 8 ++++---- crates/bevy_xr/src/hands.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fcf9449..e753cff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -804,7 +804,7 @@ dependencies = [ [[package]] name = "bevy_mod_openxr" -version = "0.1.0-rc2" +version = "0.1.0" dependencies = [ "ash", "bevy", @@ -833,14 +833,14 @@ dependencies = [ [[package]] name = "bevy_mod_xr" -version = "0.1.0-rc2" +version = "0.1.0" dependencies = [ "bevy", ] [[package]] name = "bevy_openxr_android" -version = "0.1.0-rc2" +version = "0.1.0" dependencies = [ "bevy", "bevy_mod_openxr", @@ -1213,7 +1213,7 @@ dependencies = [ [[package]] name = "bevy_xr_utils" -version = "0.1.0-rc2" +version = "0.1.0" dependencies = [ "bevy", "bevy_mod_openxr", diff --git a/crates/bevy_xr/src/hands.rs b/crates/bevy_xr/src/hands.rs index 7f222ab..a32b039 100644 --- a/crates/bevy_xr/src/hands.rs +++ b/crates/bevy_xr/src/hands.rs @@ -202,7 +202,7 @@ impl Command for SpawnHandTracker { let mut tracker = world.spawn(self.joints); match &self.side { HandSide::Left => tracker.insert(LeftHand), - HandSide::Right => tracker.insert(LeftHand), + HandSide::Right => tracker.insert(RightHand), }; let tracker = tracker.id(); world.entity_mut(root).push_children(&[tracker]); From 446c422e5dead8781ca431d8e59058f6038553cf Mon Sep 17 00:00:00 2001 From: Schmarni Date: Sat, 14 Dec 2024 02:02:14 +0100 Subject: [PATCH 6/6] bump version for bevy_mod_xr hotfix Signed-off-by: Schmarni --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e753cff..156dfc5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -804,7 +804,7 @@ dependencies = [ [[package]] name = "bevy_mod_openxr" -version = "0.1.0" +version = "0.1.1" dependencies = [ "ash", "bevy", @@ -833,14 +833,14 @@ dependencies = [ [[package]] name = "bevy_mod_xr" -version = "0.1.0" +version = "0.1.1" dependencies = [ "bevy", ] [[package]] name = "bevy_openxr_android" -version = "0.1.0" +version = "0.1.1" dependencies = [ "bevy", "bevy_mod_openxr", @@ -1213,7 +1213,7 @@ dependencies = [ [[package]] name = "bevy_xr_utils" -version = "0.1.0" +version = "0.1.1" dependencies = [ "bevy", "bevy_mod_openxr", diff --git a/Cargo.toml b/Cargo.toml index d1e0fa1..cf4cc15 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "0.1.0" +version = "0.1.1" edition = "2021" description = "Community crate for XR in Bevy" repository = "https://github.com/awtterpip/bevy_oxr"