more required components and other stuff
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -2,17 +2,11 @@ use std::ops::Deref;
|
||||
|
||||
use bevy::prelude::*;
|
||||
use bevy_mod_openxr::{
|
||||
action_binding::{OxrSendActionBindings, OxrSuggestActionBinding},
|
||||
action_set_attaching::OxrAttachActionSet,
|
||||
action_set_syncing::{OxrActionSetSyncSet, OxrSyncActionSet},
|
||||
add_xr_plugins,
|
||||
resources::OxrInstance,
|
||||
session::OxrSession,
|
||||
spaces::OxrSpaceExt,
|
||||
action_binding::{OxrSendActionBindings, OxrSuggestActionBinding}, action_set_attaching::OxrAttachActionSet, action_set_syncing::{OxrActionSetSyncSet, OxrSyncActionSet}, add_xr_plugins, openxr_session_running, resources::OxrInstance, session::OxrSession, spaces::OxrSpaceExt
|
||||
};
|
||||
use bevy_mod_xr::{
|
||||
session::{session_available, session_running, XrSessionCreated},
|
||||
spaces::XrSpace,
|
||||
spaces::{XrSpace, XrSpaceLocationFlags},
|
||||
};
|
||||
use openxr::Posef;
|
||||
|
||||
@@ -25,7 +19,7 @@ fn main() {
|
||||
PreUpdate,
|
||||
sync_actions
|
||||
.before(OxrActionSetSyncSet)
|
||||
.run_if(session_running),
|
||||
.run_if(openxr_session_running),
|
||||
);
|
||||
app.add_systems(OxrSendActionBindings, suggest_action_bindings);
|
||||
app.add_systems(Startup, create_actions.run_if(session_available));
|
||||
@@ -131,12 +125,16 @@ fn spawn_hands(
|
||||
Mesh3d(meshes.add(Cuboid::new(0.1, 0.1, 0.05))),
|
||||
MeshMaterial3d(materials.add(Color::srgb_u8(124, 144, 255))),
|
||||
left_space,
|
||||
// runtime required components are not inserted for non runrime required components, should
|
||||
// be fixed in the final bevy 0.15 release
|
||||
XrSpaceLocationFlags::default(),
|
||||
Controller,
|
||||
));
|
||||
cmds.spawn((
|
||||
Mesh3d(meshes.add(Cuboid::new(0.1, 0.1, 0.05))),
|
||||
MeshMaterial3d(materials.add(Color::srgb_u8(124, 144, 255))),
|
||||
right_space,
|
||||
XrSpaceLocationFlags::default(),
|
||||
Controller,
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user