From 2259ef230be7940a2bd64846e5d3001fa14a772c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 22:29:37 +0400 Subject: fix(combat): keep shots aligned with the sights during free look Preserve the turret aim before applying cockpit look offsets. On a stock Firing Range start the view turns under Shift while the cannon keeps the same projectile heading. The Constructor camera regression checks the same separation with a pitched turret. Control and Ngi32 confirm the CPT direction transform. The original choice of world matrix for the barrel remains open. --- apps/fparkan-game/src/player_fire.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'apps/fparkan-game/src/player_fire.rs') diff --git a/apps/fparkan-game/src/player_fire.rs b/apps/fparkan-game/src/player_fire.rs index b1be6551..719c6d3b 100644 --- a/apps/fparkan-game/src/player_fire.rs +++ b/apps/fparkan-game/src/player_fire.rs @@ -73,9 +73,10 @@ impl StaticVulkanApp { orientation_radians: state.orientation.map(f32::from_bits), }; let scale = state.scale.map(f32::from_bits); - // shortcut: the camera supplies a shared aim direction until native - // per-weapon CPT direction and turret alignment agree in world space. - let direction = self.view_camera.forward; + // shortcut: use the turret sights until the native barrel matrix is resolved. + let Some(direction) = self.player_aim_direction else { + return; + }; for (slot, barrel) in shots { let weapon = &weapons.weapons()[slot]; let hierarchy = self -- cgit v1.2.3