From 07a90f035ebd935ad9705a5f8a8916638a4a8f4f Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 20:58:16 +0400 Subject: fix(movement): carry unfinished hero turns across ticks Use the angular limit in Control profile word 11 and preserve the unconsumed phase. The original Control read and write dispatch and orientation update delivered 0.5022847 then 0.4401929 radians at two 10 ms samples. The same steps changed the view in a Vulkan window from the stock Firing Range start. --- apps/fparkan-game/src/player_collision.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'apps/fparkan-game/src') diff --git a/apps/fparkan-game/src/player_collision.rs b/apps/fparkan-game/src/player_collision.rs index dfe7e43b..e706104b 100644 --- a/apps/fparkan-game/src/player_collision.rs +++ b/apps/fparkan-game/src/player_collision.rs @@ -100,15 +100,12 @@ impl WalkRoute { } else { mouse_x * 0.95 + previous }; - let can_walk = turn.abs() <= TAU * 0.15; + let walk_time = dx.hypot(dy).min(max_step) / 14.0; + let can_walk = turn.abs() <= (TAU * 0.15).min(50.0 * walk_time); fparkan_runtime::PlayerMotion { mouse_x, movement: [0.0, f32::from(can_walk)], - delta_seconds: if can_walk { - dx.hypot(dy).min(max_step) / 14.0 - } else { - 0.0 - }, + delta_seconds: if can_walk { walk_time } else { 0.03 }, ..Default::default() } } -- cgit v1.2.3