Enhanced Melee Trace

PantheraDigital - Blueprints - Oct 2, 2024

Prevent melee collision misses with one node that utilizes traces to handle fast attacks and low FPS situations.

  • Supported Platforms
  • Supported Engine Versions
    5.4
  • Download Type
    Asset Pack
    This product contains an assortment of Unreal Engine assets which can be imported into a pre-existing project of your choice.

Using Colliders for melee weapons can be less accurate than needed as they are framerate dependent, resulting in possible missed hits, and does not provide Hit Results, reducing the amount of information given from a collision.

Traces provide Hit Results but can also be also be framerate dependent and don't change size or rotation between their start and end position.


This pack provides a single, easy to use, blueprint node that "sweeps" the trace over the distance covered in a frame making it easy to detect any possible missed collisions between frames. During the sweep any size and rotation changes from the start to the end are handled using interpolation, as well as a calculation of the necessary amount of traces needed to cover the distance to prevent overuse of checks.


This was made with melee combat in mind to handle situations where colliders or normal traces would potentially skip over a hit. This can occur at low frame rates and/or fast moving melee attacks where the distance a weapon travels in one frame is larger than its collision size resulting in teleporting through objects.


A demo map is included to demonstrate how these BP nodes works and how to use them. Examples are set up to show how it works in one frame and how it looks in motion, with adjustable FPS limits to better show what is happening.


A set up with an example weapon is also included that shows a likely situation where one character attacks another and the hit character reacts to the hit by using physics animation to flinch and particles are played. This is done using the system and a set up of interfaces that lay the groundwork for a melee system by providing communication between the weapon, its owner, and the hit object.

Technical Details

Features:

  • Per-Frame Interpolated Traces
  • Supports Line, Box, Sphere, and Capsule Traces (single and multi trace versions)
  • Automatic Trace Count Calculation
  • Adjusts number of traces performed to only what is needed based on distance
  • Example map showing how the system works and how to use it
  • Includes mesh accurate collision checks, physical animation hit reactions, and spawning particles
  • Basic weapon interface system for communication between weapons, the weapon owner, and objects hit by the weapon
  • Example weapons showing interfaces and trace system in use


Supported Development Platforms:

Windows: Yes

Mac: Yes

Documentation: See Enhanced Melee Trace Demo Map/Comments in BPs

Important/Additional Notes: Core Files in "Melee Trace" folder. All other folders are for examples.