remove 'CyberBikeModel' marker component

This commit is contained in:
Joe Ardent 2023-01-28 16:57:44 -08:00
parent e524decd38
commit c04fb9fa11
2 changed files with 2 additions and 6 deletions

View file

@ -23,9 +23,6 @@ pub struct CyberBikeBody;
#[derive(Component)] #[derive(Component)]
pub struct CyberBikeCollider; pub struct CyberBikeCollider;
#[derive(Component, Debug)]
pub struct CyberBikeModel;
#[derive(Debug, Component)] #[derive(Debug, Component)]
pub struct CyberWheel; pub struct CyberWheel;
@ -139,7 +136,6 @@ fn spawn_cyberbike(
..Default::default() ..Default::default()
}); });
}) })
.insert(CyberBikeModel)
.insert(CyberBikeBody) .insert(CyberBikeBody)
.insert(CyberBikeControl::default()) .insert(CyberBikeControl::default())
.id(); .id();

View file

@ -1,6 +1,6 @@
use bevy::prelude::*; use bevy::prelude::*;
use crate::{bike::CyberBikeModel, input::InputState}; use crate::{bike::CyberBikeBody, input::InputState};
// 85 degrees in radians // 85 degrees in radians
const MAX_PITCH: f32 = 1.48353; const MAX_PITCH: f32 = 1.48353;
@ -57,7 +57,7 @@ fn setup_cybercams(mut commands: Commands) {
fn follow_cyberbike( fn follow_cyberbike(
mut query: ParamSet<( mut query: ParamSet<(
// 0: the bike // 0: the bike
Query<&Transform, With<CyberBikeModel>>, Query<&Transform, With<CyberBikeBody>>,
// 1: the cameras // 1: the cameras
Query<(&mut Transform, &CyberCameras)>, Query<(&mut Transform, &CyberCameras)>,
)>, )>,