chore: remove bevy_mod_xr::actions
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
use bevy::{math::vec3, prelude::*};
|
||||
use bevy_mod_openxr::{add_xr_plugins, helper_traits::ToQuat, resources::OxrViews};
|
||||
use bevy_mod_xr::session::XrTrackingRoot;
|
||||
use bevy_xr_utils::xr_utils_actions::{
|
||||
ActiveSet, XRUtilsAction, XRUtilsActionSet, XRUtilsActionState, XRUtilsActionSystems,
|
||||
XRUtilsActionsPlugin, XRUtilsBinding,
|
||||
use bevy_xr_utils::actions::{
|
||||
ActionType, ActiveSet, XRUtilsAction, XRUtilsActionSet, XRUtilsActionState, XRUtilsActionSystems, XRUtilsActionsPlugin, XRUtilsBinding
|
||||
};
|
||||
|
||||
fn main() {
|
||||
@@ -73,7 +72,7 @@ fn create_action_entities(mut commands: Commands) {
|
||||
XRUtilsAction {
|
||||
action_name: "flight_input".into(),
|
||||
localized_name: "flight_input_localized".into(),
|
||||
action_type: bevy_mod_xr::actions::ActionType::Vector,
|
||||
action_type: ActionType::Vector,
|
||||
},
|
||||
FlightActionMarker, //lets try a marker component
|
||||
))
|
||||
|
||||
@@ -138,7 +138,7 @@ fn create_openxr_events(
|
||||
let (create_action, bindings) = actions_query.get(child).unwrap();
|
||||
//lets create dat action
|
||||
match create_action.action_type {
|
||||
bevy_mod_xr::actions::ActionType::Bool => {
|
||||
ActionType::Bool => {
|
||||
let action: openxr::Action<bool> = action_set
|
||||
.create_action::<bool>(
|
||||
&create_action.action_name,
|
||||
@@ -176,7 +176,7 @@ fn create_openxr_events(
|
||||
binding_writer.write(sugestion);
|
||||
}
|
||||
}
|
||||
bevy_mod_xr::actions::ActionType::Float => {
|
||||
ActionType::Float => {
|
||||
let action: openxr::Action<f32> = action_set
|
||||
.create_action::<f32>(
|
||||
&create_action.action_name,
|
||||
@@ -215,7 +215,7 @@ fn create_openxr_events(
|
||||
binding_writer.write(sugestion);
|
||||
}
|
||||
}
|
||||
bevy_mod_xr::actions::ActionType::Vector => {
|
||||
ActionType::Vector => {
|
||||
let action: openxr::Action<Vector2f> = action_set
|
||||
.create_action::<Vector2f>(
|
||||
&create_action.action_name,
|
||||
@@ -345,6 +345,13 @@ fn sync_and_update_action_states_vector(
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
|
||||
pub enum ActionType {
|
||||
Bool,
|
||||
Float,
|
||||
Vector,
|
||||
}
|
||||
|
||||
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy, SystemSet)]
|
||||
pub enum XRUtilsActionSystems {
|
||||
/// Runs in Startup
|
||||
@@ -375,7 +382,7 @@ pub struct ActiveSet;
|
||||
pub struct XRUtilsAction {
|
||||
pub action_name: Cow<'static, str>,
|
||||
pub localized_name: Cow<'static, str>,
|
||||
pub action_type: bevy_mod_xr::actions::ActionType,
|
||||
pub action_type: ActionType,
|
||||
}
|
||||
|
||||
#[derive(Component)]
|
||||
@@ -3,7 +3,7 @@ pub mod tracking_utils;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub mod transform_utils;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub mod xr_utils_actions;
|
||||
pub mod actions;
|
||||
pub mod generic_tracker;
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub mod mndx_xdev_spaces_trackers;
|
||||
|
||||
Reference in New Issue
Block a user