diff --git a/Cargo.lock b/Cargo.lock index e25d5fc..67477c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -248,7 +248,7 @@ dependencies = [ "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", - "windows-sys 0.59.0", + "windows-sys 0.60.2", "x11rb", ] @@ -1139,7 +1139,7 @@ checksum = "7ef8e4b7e61dfe7719bb03c884dc270cd46a82efb40f93e9933b990c5c190c59" [[package]] name = "bevy_mod_openxr" version = "0.5.0" -source = "git+https://git.avii.nl/Avii/bevy_oxr.git#aca40a0761d9a09111431b83a3ee2269bf3c55df" +source = "git+https://github.com/awtterpip/bevy_oxr.git#93fe370f1203fab0c37e9ab5c393129111828466" dependencies = [ "android_system_properties", "ash", @@ -1164,7 +1164,7 @@ dependencies = [ [[package]] name = "bevy_mod_xr" version = "0.5.0" -source = "git+https://git.avii.nl/Avii/bevy_oxr.git#aca40a0761d9a09111431b83a3ee2269bf3c55df" +source = "git+https://github.com/awtterpip/bevy_oxr.git#93fe370f1203fab0c37e9ab5c393129111828466" dependencies = [ "bevy_app", "bevy_camera", @@ -3474,9 +3474,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.89" +version = "0.3.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4eacb0641a310445a4c513f2a5e23e19952e269c6a38887254d5f837a305506" +checksum = "14dc6f6450b3f6d4ed5b16327f38fed626d375a886159ca555bd7822c0c3a5a6" dependencies = [ "once_cell", "wasm-bindgen", @@ -3592,7 +3592,7 @@ checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ "bitflags 2.11.0", "libc", - "redox_syscall 0.7.1", + "redox_syscall 0.7.2", ] [[package]] @@ -3692,6 +3692,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + [[package]] name = "metal" version = "0.32.0" @@ -4356,13 +4365,14 @@ dependencies = [ [[package]] name = "otd-ipc" version = "0.1.0" -source = "git+https://git.avii.nl/Avii/otd-ipc-rs.git#e705b3e8391e6afa411cba4b6238083fb452d5e3" +source = "git+https://git.avii.nl/Avii/otd-ipc-rs.git#ae15494e857ba93e63055e76da7105dd78b17610" dependencies = [ "bytes", "dirs", "serde", "serde_bytes", "slug", + "uds_windows", ] [[package]] @@ -4797,9 +4807,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b" +checksum = "6d94dd2f7cd932d4dc02cc8b2b50dfd38bd079a4e5d79198b99743d7fcf9a4b4" dependencies = [ "bitflags 2.11.0", ] @@ -4840,9 +4850,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "renderdoc-sys" @@ -5303,6 +5313,19 @@ dependencies = [ "slotmap", ] +[[package]] +name = "tempfile" +version = "3.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" +dependencies = [ + "fastrand", + "getrandom 0.4.1", + "once_cell", + "rustix 1.1.3", + "windows-sys 0.61.2", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -5575,6 +5598,17 @@ version = "1.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8c1ae7cc0fdb8b842d65d127cb981574b0d2b249b74d1c7a2986863dc134f71" +[[package]] +name = "uds_windows" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" +dependencies = [ + "memoffset", + "tempfile", + "winapi", +] + [[package]] name = "unicase" version = "2.9.0" @@ -5724,9 +5758,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.112" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d7d0fce354c88b7982aec4400b3e7fcf723c32737cef571bd165f7613557ee" +checksum = "60722a937f594b7fde9adb894d7c092fc1bb6612897c46368d18e7a20208eff2" dependencies = [ "cfg-if", "once_cell", @@ -5737,9 +5771,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.62" +version = "0.4.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee85afca410ac4abba5b584b12e77ea225db6ee5471d0aebaae0861166f9378a" +checksum = "8a89f4650b770e4521aa6573724e2aed4704372151bd0de9d16a3bbabb87441a" dependencies = [ "cfg-if", "futures-util", @@ -5751,9 +5785,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.112" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55839b71ba921e4f75b674cb16f843f4b1f3b26ddfcb3454de1cf65cc021ec0f" +checksum = "0fac8c6395094b6b91c4af293f4c79371c163f9a6f56184d2c9a85f5a95f3950" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5761,9 +5795,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.112" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf2e969c2d60ff52e7e98b7392ff1588bffdd1ccd4769eba27222fd3d621571" +checksum = "ab3fabce6159dc20728033842636887e4877688ae94382766e00b180abac9d60" dependencies = [ "bumpalo", "proc-macro2", @@ -5774,9 +5808,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.112" +version = "0.2.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0861f0dcdf46ea819407495634953cdcc8a8c7215ab799a7a7ce366be71c7b30" +checksum = "de0e091bdb824da87dc01d967388880d017a0a9bc4f3bdc0d86ee9f9336e3bb5" dependencies = [ "unicode-ident", ] @@ -5925,9 +5959,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.89" +version = "0.3.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10053fbf9a374174094915bbce141e87a6bf32ecd9a002980db4b638405e8962" +checksum = "705eceb4ce901230f8625bd1d665128056ccbe4b7408faa625eec1ba80f59a97" dependencies = [ "js-sys", "wasm-bindgen", @@ -6459,6 +6493,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + [[package]] name = "windows-sys" version = "0.61.2" @@ -6492,13 +6535,30 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link 0.2.1", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + [[package]] name = "windows-threading" version = "0.1.0" @@ -6529,6 +6589,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -6541,6 +6607,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -6553,12 +6625,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -6571,6 +6655,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -6583,6 +6673,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -6595,6 +6691,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -6607,6 +6709,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winit" version = "0.30.12" diff --git a/Cargo.toml b/Cargo.toml index 878cc52..5939f4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,8 +8,8 @@ license = "MIT/Apache-2.0" [dependencies] bevy = { version = "0.18", features = ["debug"] } # bevy_cef = { path = "../bevy_cef" } -bevy_mod_xr = { git = "https://git.avii.nl/Avii/bevy_oxr.git", version = "0.5.0" } -bevy_mod_openxr = { git = "https://git.avii.nl/Avii/bevy_oxr.git", version = "0.5.0" } +bevy_mod_xr = { git = "https://github.com/awtterpip/bevy_oxr.git", version = "0.5.0" } +bevy_mod_openxr = { git = "https://github.com/awtterpip/bevy_oxr.git", version = "0.5.0" } #bevy_mod_xr = { path = "../bevy_oxr/crates/bevy_xr" } #bevy_mod_openxr = { path = "../bevy_oxr/crates/bevy_openxr" } diff --git a/src/apad/mod.rs b/src/apad/mod.rs index 72d8e45..20f91df 100644 --- a/src/apad/mod.rs +++ b/src/apad/mod.rs @@ -566,8 +566,8 @@ fn move_kneeboard( let rot_offset: Quat = Quat::from_axis_angle(Vec3::new(1.0, 0.0, 0.0), FRAC_PI_2) * Quat::from_axis_angle(Vec3::new(0.0, 0.0, 1.0), PI); - if let Ok(trigger_state) = left.squeeze_click.state(&session, Path::NULL) - && trigger_state.current_state + if let Ok(trigger_state) = left.squeeze.state(&session, Path::NULL) + && trigger_state.current_state >= 1.0 { let Ok(transform) = left_transform.single() else { return; @@ -578,8 +578,8 @@ fn move_kneeboard( kneeboard.rotation = transform.rotation * rot_offset; } - if let Ok(trigger_state) = right.squeeze_click.state(&session, Path::NULL) - && trigger_state.current_state + if let Ok(trigger_state) = right.squeeze.state(&session, Path::NULL) + && trigger_state.current_state >= 1.0 { let Ok(transform) = right_transform.single() else { return; diff --git a/src/vrcontrollerplugin.rs b/src/vrcontrollerplugin.rs index 7a98d7d..f1491ab 100644 --- a/src/vrcontrollerplugin.rs +++ b/src/vrcontrollerplugin.rs @@ -1,5 +1,13 @@ use bevy::prelude::*; -use bevy_mod_openxr::prelude::*; +use bevy_mod_openxr::{ + action_binding::{OxrSendActionBindings, OxrSuggestActionBinding}, + action_set_attaching::OxrAttachActionSet, + action_set_syncing::{OxrActionSetSyncSet, OxrSyncActionSet}, + openxr_session_running, + resources::OxrInstance, + session::OxrSession, +}; +// use bevy_mod_openxr::prelude::*; use bevy_mod_xr::session::{XrSessionCreated, session_available}; use openxr::{Action, Posef, Vector2f}; @@ -9,9 +17,9 @@ pub struct LeftControllerActions { pose: Action, pub thumbstick: Action, pub trigger: Action, - pub trigger_click: Action, + // pub trigger_click: Action, pub squeeze: Action, - pub squeeze_click: Action, + // pub squeeze_click: Action, } #[derive(Resource)] @@ -20,9 +28,9 @@ pub struct RightControllerActions { pose: Action, pub thumbstick: Action, pub trigger: Action, - pub trigger_click: Action, + // pub trigger_click: Action, pub squeeze: Action, - pub squeeze_click: Action, + // pub squeeze_click: Action, } #[derive(Component)] @@ -84,37 +92,37 @@ fn suggest_action_bindings_left( ) { bindings.write(OxrSuggestActionBinding { action: actions.pose.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), + interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), bindings: vec!["/user/hand/left/input/grip/pose".into()], }); bindings.write(OxrSuggestActionBinding { action: actions.trigger.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), + interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), bindings: vec!["/user/hand/left/input/trigger/value".into()], }); - bindings.write(OxrSuggestActionBinding { - action: actions.trigger_click.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), - bindings: vec!["/user/hand/left/input/trigger/click".into()], - }); + // bindings.write(OxrSuggestActionBinding { + // action: actions.trigger_click.as_raw(), + // interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), + // bindings: vec!["/user/hand/left/input/trigger/click".into()], + // }); bindings.write(OxrSuggestActionBinding { action: actions.squeeze.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), + interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), bindings: vec!["/user/hand/left/input/squeeze/value".into()], }); - bindings.write(OxrSuggestActionBinding { - action: actions.squeeze_click.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), - bindings: vec!["/user/hand/left/input/squeeze/click".into()], - }); + // bindings.write(OxrSuggestActionBinding { + // action: actions.squeeze_click.as_raw(), + // interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), + // bindings: vec!["/user/hand/left/input/squeeze/click".into()], + // }); bindings.write(OxrSuggestActionBinding { action: actions.thumbstick.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), + interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), bindings: vec!["/user/hand/left/input/thumbstick".into()], }); } @@ -125,37 +133,37 @@ fn suggest_action_bindings_right( ) { bindings.write(OxrSuggestActionBinding { action: actions.pose.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), + interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), bindings: vec!["/user/hand/right/input/grip/pose".into()], }); bindings.write(OxrSuggestActionBinding { action: actions.trigger.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), + interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), bindings: vec!["/user/hand/right/input/trigger/value".into()], }); - bindings.write(OxrSuggestActionBinding { - action: actions.trigger_click.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), - bindings: vec!["/user/hand/right/input/trigger/click".into()], - }); + // bindings.write(OxrSuggestActionBinding { + // action: actions.trigger_click.as_raw(), + // interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), + // bindings: vec!["/user/hand/right/input/trigger/click".into()], + // }); bindings.write(OxrSuggestActionBinding { action: actions.squeeze.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), + interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), bindings: vec!["/user/hand/right/input/squeeze/value".into()], }); - bindings.write(OxrSuggestActionBinding { - action: actions.squeeze_click.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), - bindings: vec!["/user/hand/right/input/squeeze/click".into()], - }); + // bindings.write(OxrSuggestActionBinding { + // action: actions.squeeze_click.as_raw(), + // interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), + // bindings: vec!["/user/hand/right/input/squeeze/click".into()], + // }); bindings.write(OxrSuggestActionBinding { action: actions.thumbstick.as_raw(), - interaction_profile: "/interaction_profiles/bytedance/pico4_controller".into(), + interaction_profile: "/interaction_profiles/oculus/touch_controller".into(), bindings: vec!["/user/hand/right/input/thumbstick".into()], }); } @@ -166,13 +174,13 @@ fn create_actions_left(instance: Res, mut cmds: Commands) { .unwrap(); let pose = set.create_action("pose", "Grip Pose", &[]).unwrap(); let trigger = set.create_action("trigger", "Trigger", &[]).unwrap(); - let trigger_click = set - .create_action("trigger_click", "Trigger Click", &[]) - .unwrap(); + // let trigger_click = set + // .create_action("trigger_click", "Trigger Click", &[]) + // .unwrap(); let squeeze = set.create_action("squeeze", "Squeeze", &[]).unwrap(); - let squeeze_click = set - .create_action("squeeze_click", "Squeeze Click", &[]) - .unwrap(); + // let squeeze_click = set + // .create_action("squeeze_click", "Squeeze Click", &[]) + // .unwrap(); let thumbstick = set.create_action("thumbstick", "Thumbstick", &[]).unwrap(); cmds.insert_resource(LeftControllerActions { @@ -180,9 +188,9 @@ fn create_actions_left(instance: Res, mut cmds: Commands) { pose, thumbstick, trigger, - trigger_click, + // trigger_click, squeeze, - squeeze_click, + // squeeze_click, }) } @@ -192,13 +200,13 @@ fn create_actions_right(instance: Res, mut cmds: Commands) { .unwrap(); let pose = set.create_action("pose", "Grip Pose", &[]).unwrap(); let trigger = set.create_action("trigger", "Trigger", &[]).unwrap(); - let trigger_click = set - .create_action("trigger_click", "Trigger Click", &[]) - .unwrap(); + // let trigger_click = set + // .create_action("trigger_click", "Trigger Click", &[]) + // .unwrap(); let squeeze = set.create_action("squeeze", "Squeeze", &[]).unwrap(); - let squeeze_click = set - .create_action("squeeze_click", "Squeeze Click", &[]) - .unwrap(); + // let squeeze_click = set + // .create_action("squeeze_click", "Squeeze Click", &[]) + // .unwrap(); let thumbstick = set.create_action("thumbstick", "Thumbstick", &[]).unwrap(); cmds.insert_resource(RightControllerActions { @@ -206,9 +214,9 @@ fn create_actions_right(instance: Res, mut cmds: Commands) { pose, thumbstick, trigger, - trigger_click, + // trigger_click, squeeze, - squeeze_click, + // squeeze_click, }) } diff --git a/src/vrplugin.rs b/src/vrplugin.rs index ac0a04c..1db077f 100644 --- a/src/vrplugin.rs +++ b/src/vrplugin.rs @@ -3,8 +3,13 @@ use bevy::{ render::render_resource::TextureFormat, window::{PresentMode, WindowResolution}, }; -use bevy_mod_openxr::prelude::*; +use bevy_mod_openxr::{ + add_xr_plugins, exts::OxrExtensions, features::handtracking::HandTrackingPlugin, + init::OxrInitPlugin, resources::OxrSessionConfig, session::OxrSession, +}; +// use bevy_mod_openxr::prelude::*; use bevy_mod_xr::session::XrSessionCreated; +use openxr::EnvironmentBlendMode; use crate::vrcontrollerplugin::VrControllersPlugin; @@ -31,7 +36,13 @@ impl Plugin for VrPlugin { app.insert_resource(ClearColor(Color::NONE)) .insert_resource(OxrSessionConfig { - blend_mode_preference: { vec![EnvironmentBlendMode::ALPHA_BLEND] }, + blend_mode_preference: { + vec![ + EnvironmentBlendMode::ALPHA_BLEND, + EnvironmentBlendMode::OPAQUE, + EnvironmentBlendMode::ADDITIVE, + ] + }, formats: Some(vec![TextureFormat::Rgba8UnormSrgb]), ..Default::default() });