From 8acbd4f33be016f04ce7b1922b9a9348107c625e Mon Sep 17 00:00:00 2001 From: yuni Date: Wed, 22 May 2024 23:29:54 +0200 Subject: [PATCH] unify rotation stabilizer of players and npcs --- src/actor.rs | 3 ++- src/camera.rs | 29 +++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/actor.rs b/src/actor.rs index f5da67b..8a464ea 100644 --- a/src/actor.rs +++ b/src/actor.rs @@ -526,8 +526,9 @@ fn handle_wants_maxrotation( } } else { let angular_slowdown: f64 = - (2.0 - engine.reaction_wheels.powf(0.01).clamp(1.001, 1.1)) as f64; + (2.0 - engine.reaction_wheels.powf(0.05).clamp(1.001, 1.1)) as f64; v_ang.0 *= angular_slowdown; + //v_ang.0 *= angular_slowdown.clamp(0.97, 1.0); } } } diff --git a/src/camera.rs b/src/camera.rs index 87256c7..0e28705 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -414,6 +414,7 @@ fn manage_player_actor( #[allow(clippy::too_many_arguments)] pub fn apply_input_to_player( time: Res