Fix ledge transitions and root motion loops (#91)
CI / build-and-test (push) Successful in 1m39s
CI / production-build (push) Successful in 12m8s

## Summary

- resolve each ledge action to the walkable segment on the stage-interior side
- preserve repeating root-motion displacement across every animation cycle
- add regression coverage for left/right ledge segments and multiple root-motion wraps
- Implement ledge intangibility

Reviewed-on: #91
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #91.
This commit is contained in:
2026-10-12 21:38:23 +00:00
committed by EIREXE
parent 9b974d0dd6
commit f53e67d8ad
9 changed files with 93 additions and 34 deletions
+6 -1
View File
@@ -110,6 +110,9 @@ impl BakedFighterAnimations {
.get(&kind)
.and_then(|index| self.clips.get(*index))
}
pub fn get_animation_duration(&self, kind: AnimKind) -> Option<usize> {
self.clip(kind).map(|clip| clip.frames.len())
}
}
#[derive(Component, Clone, Debug, Default, Hash)]
@@ -411,7 +414,9 @@ impl FighterBoneMatrices {
previous.kind == animation_frame.kind
&& previous.frame.saturating_add(1) == animation_frame.frame
})
&& root_motion_loop_frame_count == Some(animation_frame.frame)
&& root_motion_loop_frame_count.is_some_and(|loop_frame_count| {
loop_frame_count > 0 && animation_frame.frame % loop_frame_count == 0
})
{
delta = delta + root_motion_cycle_delta;
}