pulled debug rendering into its own plugin

This commit is contained in:
Jay Christy
2023-10-14 11:05:06 -04:00
parent 1d434bb7a1
commit 6e7f158dd5
2 changed files with 12 additions and 2 deletions

View File

@@ -28,13 +28,22 @@ impl Plugin for OpenXrHandInput {
fn build(&self, app: &mut bevy::prelude::App) {
app.add_systems(Update, update_hand_skeletons)
.add_systems(PreUpdate, update_hand_states)
.add_systems(PostUpdate, draw_hand_entities)
.add_systems(Startup, spawn_hand_entities)
.insert_resource(HandStatesResource::default())
.insert_resource(HandInputSource::default());
}
}
/// add debug renderer for controllers
#[derive(Default)]
pub struct HandInputDebugRenderer;
impl Plugin for HandInputDebugRenderer{
fn build(&self, app: &mut bevy::prelude::App) {
app.add_systems(PostUpdate, draw_hand_entities);
}
}
#[derive(Resource)]
pub enum HandInputSource {
Emulated,