Use a Melee Action for timed sword, fist, kick, or other close-range attacks. The active attack window controls collision; Impact modules own results, and Recoil selects a response to recognized solid hits.

Build an Iron Sword attack

  1. Create a Character Item through Item Manager using the Sword or unarmed Body setup. Add Melee and assign a unique action ID matching Use Action ID/Slot ID.
  2. Review generated Repeat Combo, Simple Attack, Hitbox Collision, Generic Melee Impact Module, and Simple Recoil. Face Target starts off.
  3. Configure first- and third-person hitboxes separately around the blade/limb. Use Box, Sphere, or Capsule shapes on safe trigger/non-blocking layers.
  4. Add a Trigger Animator Audio State per combo step and implement its Item Substate Index in the Animator.
  5. Align active-start, active-complete, chain, and shared Use/Use-complete events with the animation. Open collision after wind-up and close it after contact.
  6. Configure successful Impact Actions, then add feedback/trails after collision and timing work.

Melee Action Inspector with Trigger, Usable, Attack, Collision, Attack Effects, Impact, Recoil, and Extra module groups

Groups and timing

Group Execution
Trigger, Attack, Collision, Recoil First enabled selects input/combo, attack windows, detection, and recoil response.
Usable All compatible shared Usable modules.
Attack Effects / Impact All enabled feedback / hit responders.
Extra Trail Effect or project melee behavior.

Melee Action lifecycle from Start Use and the active attack window through collision, impact or recoil, completion, and Stop Use

Simple Attack setting Inspected default Purpose
Active Attack Start Event Trigger 0 seconds Open collision, or wait for OnAnimatorActiveAttackStart.
Active Attack Complete Event Trigger 0.2 seconds Close collision, or OnAnimatorMeleeAttackComplete.
Allow Chain Attack Event Trigger 0.2 seconds Permit the next combo use, or OnAnimatorAllowChainAttack.
Attack ID / State Name 0 / empty Filter attack results and optionally activate a character/item State.
Strength Multiplier 1 Multiply Trigger force before hitbox damage scaling.
Allow Attack Combos On Permit Trigger combo progression.

Simple/Repeat Combo advances Trigger states across separate uses. Multi Attack creates several windows in one use, with individual attack data/timing and a reset target list per subattack. With per-hitbox Single Hit off, each subattack can damage the same target once.

Normal active completion clears its State and completion effects. Pair forced interruption with explicit State/effect cleanup and cancellation of pending events. Force Root Motion Position/Rotation default off; enable only axes owned by an authored lunge clip.

Collision, shields, and repeat hits

Collision defaults are Trigger Interaction > Ignore, Max Collision Count 20, and Forward Shield Sensitivity -0.75. Configure Impact Layers for intended targets. Active-attack hit lists exclude the attacker and first-person camera children.

Collision choice Configuration
Hitbox Collision Separate perspective MeleeHitbox arrays. Collider Object ID -1, Damage Multiplier 1, minimum Y/Z offsets zero, Require Movement off, Single Hit off, optional Surface Impact.
Sphere Overlap Collision Local center (0, 1, 1), radius 1; no per-hitbox multiplier/surface override.
Interpolated fast-motion detection Use a project module retaining previous pose and bounding merged results to collision capacity.

Keep hitbox colliders enabled on the intended non-blocking layer, with attack timing governing checks. Per-hitbox Single Hit suppresses later checks after a hit; several targets in the current overlap may still receive impacts. Use project stop-on-first-impact logic for a strict one-collision result. For repeat damage, use separate Multi Attack windows or an explicit custom policy.

An equipped Shield Action can receive redirected impacts when facing and Aim requirements pass. Shield owns absorption and Block/parry. Check absorption separately from recoil: use a collider-based project recoil test for child Shield Colliders. For scenery, supply RecoilObject.

Feedback, recoil, and special attacks

Generic Item Effects defaults to On Start Attack on, On Complete Attack off, with Substate Index/Attack ID -1 matching all. Use explicit start/completion groups and interruption cleanup for object visibility. Generic Melee Impact Module likewise defaults filters to -1, default Conditions/success damage group, and empty failure group; use separate rows for different attacks.

Simple Recoil uses priority 500 and reports OnMeleeRecoil. For strict first-impact cancellation across several hitboxes, provide a collision module that stops both target and outer hitbox loops.

Trail Effect defaults to Attack, no spawn delay, and Attack Stop Trail Event 0.5 seconds. Its presentation begins at Start Use. Assign a pooled Trail and both perspective locations; use explicit active-start/completion feedback or a project trail module when visibility must match the collision window exactly.

For aerial attacks, configure In Air Melee Use and its In Air Trigger policy. For post-block responses, configure Melee Counter Attack with its own ID, range, input order, and collision setup.

Verify windows and cleanup

Equip and inspect Debug while attacking empty space, then a known target. Collision should run only inside the active window. Inspect Attack ID, hit count, and strength, initially keeping Trigger/attack/hitbox multipliers at 1.

Repeat both perspectives, each combo step at slow/chain timing, and Multi Attack windows against the same target. Test a miss, aimed/unaimed shields, RecoilObject, ordinary scenery, several hitboxes/targets, airborne use, root motion, and interruption. Confirm no State, trail, or completion-only effect remains after a forced stop.

Finish/cancel transient attacks around save/load; persist authored configuration and durable inventory rather than hit lists, combo progress, timers, or active recoil. Network-supported modules have specific attack/effect/impact calls; custom effects, completion feedback, trails, and reactions still need authority/replication. Test owner, server, and remote roles.

Custom modules use MeleeUseDataStream, MeleeAttackData, and MeleeImpactCallbackContext. Balance every OnActiveAttackStart with OnActiveAttackComplete, and preserve lifecycle cleanup when implementing custom collision/recoil. See Events for observing recoil and shared item events.