Hi guys, in this video, I want to showcase an Unreal Engine plugin which bakes distance bounds by angle of attack hit zone.
Its purpose is to help AI know which attack could possibly hit anything in advance.
Each weapon blueprint must have a Collision used to deal damage.
A weapon must also implement a combo initializer which will reference any relevant Animation Montage.
The plugin comes with a new asset called “Weapon Attack”.
After choosing a Skeletal Mesh, an Animation Blueprint, you can select which Weapon you want to target.
The plugin uses the previously mentioned initializer to find out and list all the montages used by this weapon.
You can play and preview any one of them, bake one specific or directly bake them all.
When you start baking, the animation uses the DeltaTime you’ve setted up for the needed precision.
For each frame, it traces a capsule from the actor's initial position for each 360 directions to get the minimum & maximum hitted distance of the Weapon’s current Collision.
In that way, when an AI needs to know if a target could be hitted by an attack, it just needs to know if its target’s distance is within the range corresponding to its direction angle (between ActorForwardDir & ActorToTargetDir).
To be more accurate, each montage notifies when the damage is actually starting and stopping.
Early stage demo shows that the AI seems more clever, reactive and better mimics how humans would play with their attacks.
Thanks for watching!