Quick answer: Mirror flips the collision polygon along with the visual. For asymmetric hitboxes that shouldn’t flip, use a separate sprite pinned to the player and orient it via offset, not mirror.
Your player has a sword sticking out to the right with a collision polygon extending into the blade. The player turns left (Mirror); the sword visually points left as intended; but enemies on the player’s right side now take damage because the collision polygon also flipped and reaches into space behind the player.
Mirror Affects Both Visual and Collision
Mirror is a transform-level flip on the sprite. The same transform applies to the rendered image and to the collision polygon — they’re both expressed in the sprite’s local space and rendered through the same matrix. There’s no per-property control to mirror visual but not collision (or vice versa).
For most cases this is what you want: an asymmetric character with a tail on the right should have a collision shape that puts the tail on the left when mirrored. The bug pattern is specifically asymmetric attack hitboxes — where you intend the collision to follow your attack direction, but the same direction must come from explicit facing logic, not the visual mirror.
Fix 1: Symmetric Collision Polygon
If the character’s body collision should be the same regardless of facing direction:
- Open the sprite in the Animation editor.
- Edit the collision polygon to be symmetric about the vertical axis.
- Save.
A common shape is an oval or hexagon centered on the origin. Mirroring this leaves it unchanged. Players and enemies use symmetric body hitboxes; only attack-specific hitboxes need facing-aware logic.
Fix 2: Separate Hitbox Sprite for Attacks
For melee attacks where the hitbox should reach a specific direction:
- Create a new sprite HitboxSword with the desired collision polygon and invisible image.
- Pin it to the player on attack start.
- Position offset based on facing:
HitboxSword.X = Player.X + 24 * (Player.Mirrored ? -1 : 1). - Destroy after the attack animation finishes.
The hitbox sprite isn’t mirrored — only its position offset changes with facing. Collision behaves as expected: hitbox is on the right when facing right, on the left when facing left.
This pattern also lets you have multiple hitboxes per attack (e.g., a swing arc), spawn them at specific animation frames via the Sprite’s “On frame changed” trigger, and tune their lifetime independently of the visual.
Fix 3: Facing Variable Instead of Mirror
Some teams use an instance variable facing (1 or -1) instead of Mirror. Visual flipping is done via Sprite.SetScale(facing, 1) or via two-direction sprites. Collision polygons must be drawn symmetric in the editor, but you have full control over hitbox positioning since the runtime never “mirrors” anything.
Diagnosing
Enable the debug overlay with the Inspector’s “Show debug info”. Press F12 in the runtime preview and select your sprite — the collision polygon is drawn over the sprite. Mirror the sprite (Set Mirrored On) and watch the polygon flip. That’s the moment to decide: symmetric polygon, separate hitbox, or facing-variable architecture.
Verifying
Build a test layout with the player facing both directions, swinging the sword at static targets on both sides. Targets should only take damage from the side the sword is pointing at. Stale-hit reports usually indicate a missing facing check or an over-large collision polygon.
“If the hitbox should reach a specific direction, the hitbox is its own sprite. Don’t fight the mirror; sidestep it.”
Hitbox-per-attack also makes balance changes easier — tune one hitbox without touching player art.