Add physics interpolation and fix lingering ground attack hitboxes
This commit is contained in:
@@ -4,7 +4,7 @@ use bevy::prelude::*;
|
||||
|
||||
use crate::{
|
||||
fighter::{
|
||||
FighterECB, FighterFacingDirection, FighterTranslation, FighterVisual,
|
||||
FighterFacingDirection, FighterVisual,
|
||||
visual::FighterAnimations,
|
||||
},
|
||||
player::Player,
|
||||
@@ -54,15 +54,6 @@ pub fn advance_fighter_animation_frames(mut fighters: Query<&mut FighterAnimatio
|
||||
}
|
||||
}
|
||||
|
||||
pub fn apply_fighter_translation_to_visuals(
|
||||
query: Query<(&FighterTranslation, &FighterECB, &mut Transform)>,
|
||||
) {
|
||||
for (translation, ecb, mut transform) in query {
|
||||
let translation = translation.0 + ecb.get_bottom_point();
|
||||
transform.translation = Vec3::new(translation.x.to_num(), translation.y.to_num(), 0.0);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn setup_fighter_animation_player(
|
||||
mut commands: Commands,
|
||||
animated: Query<Entity, Added<AnimationPlayer>>,
|
||||
@@ -153,4 +144,5 @@ pub enum AnimKind {
|
||||
// Attacks
|
||||
|
||||
AttackJab1,
|
||||
AttackUpTilt,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user