Melee Attacking: Line Trace on AnimNotify (Lyra) or Toggled Collision on AnimNotifyState (ActionRPG)?

bwbilyeu
Tue, 19 Dec 2023 18:15:13 +0000
Character & Animation

Is there a noteworthy difference or caveat between either approach in a multiplayer game with a dedicated server? There are a few pros/cons that come to mind with each, but I’m not sure either is better/worse (from my limited experience). I’d like to avoid implementing both unless there is a real need to do so.

The Line Trace approach is used in Lyra by Plugins/ShooterCore/Game/Melee/GA_Melee, while the Toggled Collision is used by melee attacks in ActionRPG by Blueprints/Weapon/WeaponActor.

Toggled Collision on AnimNotifyState: This looks like it might work better for slower attacks which the chance to dodge is expected & allowed. It might also work well with weapons that ‘flare out’ as they’re used (ex: sword on fire). However, the extra effort/overhead of tracking struck targets during an attack “swing” (to avoid multiple hits per target) and per-hit/overlap invocations are considerations.

Line Trace on AnimNotify: This looks like it might be more performant given that it’s a singular line trace that produces an array to iterate over. However, this looks like it could become more problematic with slower attacks (at a glance) and works better with more straightforward types of attacks.

1 post - 1 participant