fix matching velocity when inside vehicles

This commit is contained in:
yuni 2024-07-14 21:16:32 +02:00
parent 20b2ae049a
commit 5847fde332

View file

@ -428,7 +428,12 @@ pub fn apply_input_to_player(
q_target: Query<&LinearVelocity, (With<hud::IsTargeted>, Without<actor::PlayerCamera>)>, q_target: Query<&LinearVelocity, (With<hud::IsTargeted>, Without<actor::PlayerCamera>)>,
q_closest: Query< q_closest: Query<
(&Position, &LinearVelocity), (&Position, &LinearVelocity),
(Without<hud::IsTargeted>, Without<actor::PlayerCamera>), (
Without<hud::IsTargeted>,
Without<actor::PlayerCamera>,
Without<actor::Player>,
Without<actor::PlayerDrivesThis>,
),
>, >,
mut q_playercam: Query< mut q_playercam: Query<
( (