Collisions Manager {{ currentPage ? currentPage.title : "" }}

3.1 Collisions Manager Component

Combat Collisions Manager is the Plugin that manages collisions during combat. It is pretty generic and in ACF is used multiple time for both character, weapons and projectiles. The only thing to do is to configure and activate it when needed. First of all you need to add the ACMCollisionMasterComponent to your GameMode. This will be the responsible of all the collisions check. 

3.2 Setting up your damage zones

To start using ACM you need to add the Collision Manager Component to the actor you want to deal damage and configure it:

Here an example of a Blueprint that configure the component to call DoStuff when a collision is detected, while ignoring itself and using as a collision mesh the SkeletalMeshComponent called Mesh.

To properly handle damage we now have to setup damage zones on your mesh and configure the component:

Damage Zones are called Damage Traces. They are defined in the component properties as an array, each zone is identified with a Start Socket, an End socket and the radius of the damage volume. To let the component work properly you must add socket with the same name on your mesh.  Collision Channels are the channels against the Trace is performed (for optimization all other channels are ignored so basically be sure to properly setup this field). Please notice that your target colliders (enemies body, for instance) should be set to Overlap to at least one of the collision target added to the ACM component. Allows multiple hits per swing is by default turned off to avoid that a multiframe trace collision can hit multiple time the same enemy, if this is your expected behavior please turn it on.

If you want to see your damage volume at runtime you should turn on the Debug Info. Please note that in ACF every tick is by default disabled, so you will not probably see the volume, if not during the swing (when the trace are active). You can try the component on other meshes / actor to check the volume. 

Please Notice: In ACF damage collisions, ignored actors etc. are already setted up automatically for melee weapons, physical attacks and projectiles!

To activate and stop damages you have to call the StartSingleTrace, StartAllTraces and StopSingleTrace, StopAllTrace methods, or StartSingleTraceTimed, StartAllTraceTimed that automaticly turns off collisions after a certain amount of time. For more info please check the DocuActor.

3.3 Damage System

ACM Damage system is based upon Unreal Damage System. if AutoApplyDamage is enabled, every time the component hits something, it calls Unreal TakeDamage on the hit Actor.

The FDamageEvent is automatically constructed by the Component with the HitResult and the info provided in configuration.

{{{ content }}}