Fix ledge transitions and root motion loops (#91)
## 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user