diff --git a/src/actor.rs b/src/actor.rs index 064bc7b..065b00d 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -1,5 +1,6 @@ use bevy::prelude::*; use bevy_xpbd_3d::prelude::*; +use bevy::math::DVec3; use crate::{actor, audio, chat, nature, settings}; pub const ENGINE_SPEED_FACTOR: f32 = 30.0; @@ -11,6 +12,7 @@ impl Plugin for ActorPlugin { fn build(&self, app: &mut App) { app.add_systems(FixedUpdate, ( update_physics_lifeforms, + handle_wants_norotation, )); app.add_systems(Update, ( handle_input, @@ -59,6 +61,7 @@ impl Default for Actor { #[derive(Component)] pub struct InConversationWithPlayer; #[derive(Component)] pub struct ActorEnteringVehicle; #[derive(Component)] pub struct ActorVehicleBeingEntered; +#[derive(Component)] pub struct WantsNoRotation; #[derive(Component)] pub struct LifeForm { @@ -294,3 +297,22 @@ fn handle_collisions( } } } + +fn handle_wants_norotation( + time: Res