From 514136ca97191672ecd24173d1836cdc4d26493b Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 14:00:09 +0400 Subject: feat(player): bob the cockpit view when walking Use the 0.45 second vertical cycle observed in the GOG hero camera. The stock Firing Range window shows lift on an accepted walk and settles on release. The body and muzzle still use their own poses. --- apps/fparkan-game/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'apps/fparkan-game/src/main.rs') diff --git a/apps/fparkan-game/src/main.rs b/apps/fparkan-game/src/main.rs index cbd81e22..f06b5d05 100644 --- a/apps/fparkan-game/src/main.rs +++ b/apps/fparkan-game/src/main.rs @@ -10523,9 +10523,13 @@ impl StaticVulkanApp { let pose = mount.map_or(pose, |mount| compose_unit_pose(mount, pose)); let offset = rotate_unit_vector(cockpit.node_point, pose.rotation); let point = std::array::from_fn(|axis| pose.translation[axis] + offset[axis]); + let mut translation = state.position.map(f32::from_bits); + if let Some(engine) = &self.mission_engine { + translation[2] += fparkan_runtime::player_walk_camera_lift(engine, cockpit); + } let camera = fparkan_render::forward_cockpit_camera( LegacyIron3dEulerTransform { - translation: state.position.map(f32::from_bits), + translation, orientation_radians: state.orientation.map(f32::from_bits), }, state.scale.map(f32::from_bits), -- cgit v1.2.3