fix: Applying player direction to AttackArea

This commit is contained in:
Alexey 2026-04-17 15:10:46 +03:00
commit e80a7cc154

View file

@ -89,8 +89,9 @@ pub fn handle_input(
if let Some(attack_area) = weapon.attack_area(attacking.phys, attacking.accuracy) {
let offset = weapon.attack_offset();
let direction = if sprite.flip_x { vec2(-1., 1.) } else { vec2(1., 1.) };
commands.entity(player_id)
.with_child(attack_area.into_bundle(offset, sprite.flip_x, GROUP_ENEMY));
.with_child(attack_area.into_bundle(offset * direction, sprite.flip_x, GROUP_ENEMY));
}
}
} else if let Some(mut awaiting) = maybe_awaiting {