Collision Trace Target {{ currentPage ? currentPage.title : "" }}

A Collision Trace Target Type, derived from BP_TargetType, is a collision handler actor that the collision system uses to handle collision that requires a trace that is constantly searching for hits until the trace is deactivated. TraceTarget is the base class for all trace collision handler actors.

Many of the functionalities created in Target Type Class are also used for the Collision Trace Target. To check other functionalities of the Collision Trace Target Class you can also check the Target Type Class documentation.

Basic Usage

The flow of logic execution for a collision trace target after being added to an actor’s Collision Component is similar to Target Type Class with a few additional functionalities added, such as:

Set Collision Properties - Sets the Collision Mesh & socket names used for the collision trace

On Hit - This is the function that fires when the collision trace hits something. For example, when swinging a sword the collision trace will hit an actor once & fire the On Hit event. You can use this event to apply things such as hit effects to the hit actor.

Start Trail - This is the event that can be used if you wish to add some type of collision trail to the collision. By default the base class has no functionality written in this event. However, the weapon trace target does have functionality for this.

End Trail - This event can be used to end collision trails. No default implementation, designed to be overridden in child classes as needed.

Trace Target Properties

The trace target has all the same properties as the default Target Type Class with some additional properties added for changing things about the collision trace.

  • Draw Debug Type - Allows to set the visibility of the collision trace. Used for debug purposes

Basic Requirements

The Collision Trace target type uses socket names by default to determine the size of the collision & how to trace along the path of a mesh. So, when adding a collision trace target type you must also be sure to set the collision mesh by calling “Set Collision Properties”.

In addition to this it is required that you add sockets to the mesh so that the collision system will have sockets to trace with.

{{{ content }}}