From e80a7cc15445102f782cb6132711735e3739cd2b Mon Sep 17 00:00:00 2001 From: 2ndbeam <2ndbeam@disroot.org> Date: Fri, 17 Apr 2026 15:10:46 +0300 Subject: [PATCH] fix: Applying player direction to AttackArea --- src/player/systems.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/player/systems.rs b/src/player/systems.rs index 89b3fe9..d0cbb02 100644 --- a/src/player/systems.rs +++ b/src/player/systems.rs @@ -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 {