Distinguish animation and IK target jumps in offboard bail capture

This commit is contained in:
chazmm committed 2026-09-06 22:55:25 +01:00
1 parent cdaaa8f792
commit a8e33b6108
2 files changed
+50

No files matched your search

@@ -18,6 +18,11 @@ struct Sample {
pose_errors: [[f32; 4]; 24],
physical_positions: [[f32; 4]; 24],
drive_positions: [[f32; 4]; 24],
animation_positions: [[f32; 4]; 24],
animation_basis_squared: [[f32; 3]; 24],
original_positions: [[f32; 4]; 24],
foot_targets: [skate_core::animation::foot_ik::transforms::LimbFrames; 2],
animation_name: Option<String>,
contacts: [bool; 24],
contact_age: [f32; 24],
drive_weight: f32,
@@ -59,6 +64,16 @@ pub(crate) fn record(skater: &mut SkaterRuntime) {
pose_errors: skater.pose_errors.parts,
physical_positions: std::array::from_fn(|i| skater.skeleton.record.pose[i][3]),
drive_positions: std::array::from_fn(|i| skater.skeleton_input.drive_frames[i][3]),
animation_positions: std::array::from_fn(|i| skater.animated_skeleton.record.pose[i][3]),
animation_basis_squared: std::array::from_fn(|i| std::array::from_fn(|axis| {
let v = skater.animated_skeleton.record.pose[i][axis];
(v[0] * v[0] + v[1] * v[1]) + v[2] * v[2]
})),
original_positions: std::array::from_fn(|i| {
skater.animation.packet.hierarchy[skater.animated_skeleton.bone_indices[i]][3]
}),
foot_targets: [skater.foot_ik.state.frames[0], skater.foot_ik.state.frames[1]],
animation_name: skater.animation.motion.animation.current_name.clone(),
contacts: skater.collision_feedback.current,
contact_age: skater.collision_feedback.contact_age,
drive_weight: skater.collision_feedback.drive_weight,
+35
View File
@@ -0,0 +1,35 @@
# Offboard fall investigation
User reproduction: `logs/game-20260906-224637.stderr.log`, default map,
Hardcore, BipedAir state 501. No automated or agent gameplay tests were run.
The four captured airborne ticks show drive weight 1 and no reported world
contacts. This does not exclude self contacts: the feedback publisher filters
same-actor contact reports. Bail reason 18 is requested at tick 4.
The crucial change is in the target, not merely a physical leg drifting away:
| Tick | Part 19 drive position (animation coordinates) | Physical position (world coordinates) |
| --- | --- | --- |
| 1 | 0.017, 0.475, -0.596 | 2.643, 0.444, 2.526 |
| 2 | -0.082, 0.411, -0.573 | 2.603, 0.361, 2.591 |
| 3 | -0.549, 0.294, -0.335 | 2.394, 0.215, 2.944 |
| 4 | 0.537, 1.619, -0.047 | 2.642, 0.408, 2.682 |
At tick 4 part 19 has 1.206 m pose error and part 21 has 0.803 m, exceeding
the existing squash check. Both feet have local IK targets and full external
blend. Their retained local translation deltas are effectively zero in XYZ.
The existing capture did not contain the unmodified animation pose, so it
cannot distinguish an animation target discontinuity from an IK-generated one.
The next capture includes original joint positions, pre-IK volume positions
and basis lengths, final foot target frames, and the current animation name.
Static comparisons found no basis to change the air trajectory, disable the
bail, or change the joint solver. Native foot IK uses a rigid transpose for
the external adjacent-volume frame (82BEE390), and native prelanding leg
extension really multiplies the accumulated height (82BAFD30); neither is an
established defect. MatchAirTime (82BBA070) seeks the current sequence to the
fraction of elapsed flight. Generated native instruction extracts are in
`logs/biped-*.txt`; authoritative TU3 sources remain in Skate3Research.
No gameplay fix is claimed by these diagnostic commits.