From f2744b5b17385edcd79286174224830997bd796e Mon Sep 17 00:00:00 2001 From: chazmm Date: Tue, 8 Sep 2026 21:20:15 +0100 Subject: [PATCH] Restore takeoff heading isolation from authored board spin --- .../src/physics/ground_animation.rs | 4 ++- .../skate-game/src/physics/riding_outputs.rs | 29 ++++++++++++++----- docs/archive-crates-5-integration.md | 11 +++++++ 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/crates/skate-game/src/physics/ground_animation.rs b/crates/skate-game/src/physics/ground_animation.rs index b2c42e4e..6177434b 100644 --- a/crates/skate-game/src/physics/ground_animation.rs +++ b/crates/skate-game/src/physics/ground_animation.rs @@ -50,7 +50,8 @@ pub(crate) fn advance(physics: &mut GamePhysics, skater: &mut SkaterRuntime) -> skater.ground_animation.launched = false; let p = &skater.player_input.processed; let com = p.animation_com_to_deck_752.map(f32::from_bits); - physics.riding.update_ground_reckoning( + let heading = physics.riding.reckoning_frames.heading; + physics.riding.update_ground_reckoning_with_heading( &physics.board, super::riding_outputs::RidingPoseInputs { com_to_deck: Vector3::new(com[0], com[1], com[2]), @@ -60,6 +61,7 @@ pub(crate) fn advance(physics: &mut GamePhysics, skater: &mut SkaterRuntime) -> skater.animation_input.fields.balance, p.flags_2476 & 0x4000_0000 != 0, p, + heading, ); skeleton::advance(physics, skater)?; skater.skeleton_output.correction.pending = true; diff --git a/crates/skate-game/src/physics/riding_outputs.rs b/crates/skate-game/src/physics/riding_outputs.rs index dd26e482..ac8d1443 100644 --- a/crates/skate-game/src/physics/riding_outputs.rs +++ b/crates/skate-game/src/physics/riding_outputs.rs @@ -155,18 +155,33 @@ impl RidingOutputs { animation_balance: f32, coffin: bool, processed: &skate_core::player::input_phase::ProcessedPhysicsInput, + ) { + let deck = board.part_transforms()[BodyId::Deck.index()]; + // Ordinary ground riding follows the physical deck (82D4E250). + self.update_ground_reckoning_with_heading( + board, pose, processed_flags_2468, animation_balance, coffin, processed, + [deck.basis.columns[2][0], deck.basis.columns[2][1], deck.basis.columns[2][2], 0.0], + ); + } + + /// Animated takeoff retains the rider's heading while the deck begins its + /// authored spin. Feeding the driven deck axis back into this frame would + /// apply that spin to the whole skater again on each ground-animation tick. + pub fn update_ground_reckoning_with_heading( + &mut self, + board: &BoardRuntime, + pose: RidingPoseInputs, + processed_flags_2468: u32, + animation_balance: f32, + coffin: bool, + processed: &skate_core::player::input_phase::ProcessedPhysicsInput, + heading: [f32; 4], ) { let observations = ground_input::GroundPacketInputs::from_processed(processed); let deck = board.part_transforms()[BodyId::Deck.index()]; - //82D4E250 overrides heading1200 from input752 (raw board Z). //The source takes the previous final frame X for the damping step. let previous_right = self.reckoning_frames.system[0]; - self.reckoning_frames.heading = [ - deck.basis.columns[2][0], - deck.basis.columns[2][1], - deck.basis.columns[2][2], - 0.0, - ]; + self.reckoning_frames.heading = heading; body_spin::update_ground(&mut self.body_spin, pose.body_spin); let effective = BoardMotionOutput::from_board( board, diff --git a/docs/archive-crates-5-integration.md b/docs/archive-crates-5-integration.md index 5c599524..e42fb0cc 100644 --- a/docs/archive-crates-5-integration.md +++ b/docs/archive-crates-5-integration.md @@ -95,3 +95,14 @@ push, merge into the main branch, or release is performed by this task. Report failures with the diagnostic report, map/difficulty and last controller action. Compile and source-preservation checks do not establish gameplay parity. + +## Takeoff heading regression + +Restored the `c70726d` takeoff-heading separation removed by the re-merge. +GroundAnimation retains the rider heading while the authored deck begins to +spin; ordinary ground riding still follows the physical deck. The imported +processed ground-input observations remain in use. The existing +`nollie_inward_heel_keeps_body_heading_at_pop` regression compiles but was not +executed (private gameplay assets required). Check nollie inward heels and +other flip tricks, stationary and rolling, for an abrupt sideways body turn +at takeoff while ensuring the board still spins and intentional body spins work.