Saltmire Hitbox 2D - Combat Damage System View on Asset Store (opens in new tab)

Package details

Latest version
1.0
Last updated
First released
Unity version
6000.5.5 or later
Package size
20 KB
Files
15
Views in the past week
9

Price tracking

Last checked
Tracked since
Lowest recorded
$4.99 on

Keywords

Saltmire Hitbox 2D - Combat Damage System

by Saltmire (opens in new tab)

No ratings yet

Drop-in Hitbox2D and Hurtbox2D for Unity 2D: teams, knockback, i-frames, crits and damage resistances, with zero collision-layer setup.

Price $4.99

Buy on Asset Store (opens in new tab)

Affiliate link · Purchases support this site

Price history

Last 6 months

USD
Price history for Saltmire Hitbox 2D - Combat Damage System, 6 months Current $4.99; lowest $4.99; highest $4.99 in this period. $0 $2.5 $5 Sep Oct Nov

Asset preview

1 / 3

Saltmire Hitbox 2D - Combat Damage System screenshot 1

Saltmire Hitbox 2D - Combat Damage System screenshot 1

About this asset

Your hitbox turns on right on top of the enemy — and nothing happens.

Every 2D dev hits this one. OnTriggerEnter2D only fires when a collider enters. If your attack activates while it is already overlapping the target, the hit is silently lost. So you start patching: manual overlap calls, a layer matrix nobody remembers, and a list to stop the same enemy taking damage every physics frame.

Saltmire Hitbox is that whole layer, already solved.

Add Hitbox2D to your attack and Hurtbox2D to whatever can be hurt. Give them different teams — that is the entire setup, with no collision matrix to maintain. Call Activate() when the swing starts and it also catches targets that are already overlapping, so the hit never goes missing.

HONEST ABOUT SCOPE

This is a focused runtime layer, not a full combat framework. There is no health bar, no enemy AI and no weapon inventory — on purpose. It does hit detection and damage delivery, does it correctly, and stays out of your way. Three clean, commented scripts you can read in one sitting, wired to whatever health and feedback systems your game already has.

TESTED, NOT JUST WRITTEN

Ships with 7 PlayMode tests covering every rule it claims: hits between different teams, same-team immunity, one hit per swing, critical multipliers, resistances, and hits correctly swallowed by invincibility frames. Open the Test Runner and verify the behaviour yourself before you trust it in your game.

From the publisher's Asset Store listing.

Technical details

FEATURES

- Team-based hits: allies never damage each other, no layer matrix to maintain

- Already-overlapping detection: Activate() resolves targets the hitbox switches on top of, fixing the classic melee bug

- One hit per swing (oneShot): a lingering hitbox will not drain a target every frame; ResetSwing() re-arms it

- Invincibility frames: per-hurtbox i-frames with an OnInvincibilityEnded event

- Knockback: impulse direction computed away from the hitbox centre

- Critical hits: chance and multiplier, flagged in the damage payload

- Damage types and resistances: 0 is immune, below 1 resistant, above 1 weak

- Accurate hit events: OnHit fires only when damage was actually dealt, and reports the final amount after crits and resistances

- Zero setup: components self-configure onto a shared physics layer

- No allocations on the hit path

INCLUDED

- Hitbox2D, Hurtbox2D and DamageInfo: fully commented C# source

- Playable demo scene with floating damage numbers and critical hits

- Custom inspectors with inline documentation and setup warnings

- Offline documentation (RTF) with table of contents, setup guide and full script reference

- 7 PlayMode tests

REQUIREMENTS

- Unity 2D with the built-in Physics 2D module

- No third-party dependencies: no TextMeshPro, no packages to install

- Works on every build target Unity supports, including WebGL and mobile

DOCUMENTATION

- Included in the package at Assets/SaltmireHitbox/Documentation.rtf

Compatibility

Render pipelines supported in each Unity version
Unity version Built-in URP HDRP Custom
6000.5.5f1 Compatible Compatible Compatible Compatible

Runtime components are pure gameplay logic - no shaders or materials - so they work identically in Built-in, URP, HDRP and custom pipelines, using only Physics 2D. The optional demo scene uses legacy TextMesh, authored for Built-in, so its damage numbers may render incorrectly in URP/HDRP. Demo only - never the runtime you ship. The Samples folder can be deleted safely.

As listed on the Asset Store.