Initial work on ledge & improved baking of root motion. (#90)
CI / build-and-test (push) Successful in 2m15s
CI / production-build (push) Successful in 12m24s

Reviewed-on: #90
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #90.
This commit is contained in:
2026-10-12 20:58:27 +00:00
committed by EIREXE
parent 0642a9234b
commit 9b974d0dd6
22 changed files with 1094 additions and 141 deletions
+10
View File
@@ -1,5 +1,6 @@
use crate::fighter::state::jump::{self};
use crate::fighter::state::land::{LandingState, LandingType};
use crate::fighter::state::ledge_wait::LedgeWaitState;
use crate::fighter::state::{
CollisionContext, FighterState, InterruptContext, air_attack, air_dodge,
};
@@ -126,6 +127,15 @@ pub fn collision_interrupt(
landing_type: LandingType,
can_ignore_soft_platforms: bool,
) -> Option<FighterState> {
if ctx.velocity.y <= FGi32::ZERO {
if let Some(ledge_result) = ctx.air_collide_with_ledges() {
return Some(FighterState::LedgeWait(LedgeWaitState {
airborne_state_common: AirborneStateCommon::default(),
ledge_id: ledge_result.ledge,
}));
}
}
let res = ctx.air_collide_with_stage(can_ignore_soft_platforms)?;
let diff = res.hit_position - ctx.translation.0;
ctx.ecb.bottom -= diff;