🌟Getting Set Up
In this tutorial you will learn how to set up the plugin.
Last updated
In this tutorial you will learn how to set up the plugin.
Last updated
Tip: make sure to already implement basic firing logic in your project.
First, it is essential to add the Recoil Animation Component to the character.
Then, in your character class click on the RecoilAnimation component and specify the Helper UI:
The Helper UI is useful when you want to modify the recoil values in runtime in a very convenient way:
To enable this Helper UI in the game you can use the Blueprint-exposed methods:
Make sure to call the Init
method of the Recoil Animation Component to initialize the recoil animation:
Data: Recoil Data asset.
Rate: fire rate or RPM (Rounds-per-minute).
Burst: length of the burst sequence.
Next, call Play
and Stop
methods when firing:
Note: Play must be called every shot!
Make sure to add a Recoil Animation node to the Anim Graph:
If you already have an IK system set up, select the IK or a VB (virtual bone) you want to animate with recoil in the node settings:
First, add Virtual Bones to the character head:
VB WeaponPivot targets ik_hand_gun.
VB hand_r targets hand_r.
VB hand_l targets hand_l.
Add CopyBone nodes before the Recoil Animation nodes:
If your animations do not keyframe the ik_hand_gun bone (it is used for baking gun movement into the character animation), you will have to use hand_r as a source bone in the first CopyBone node. You can additionally offset the VB WeaponPivot with a custom offset if you want more flexibility.
Finally, use Two Bone IK after the Recoil Animation node:
At this point, the setup is complete. If recoil is still not playing, double-check the steps above or:
Check if Recoil Data has any values.
The correct bone is animated by the RecoilAnimation.
Play method is called every shot.
The Fire Rate is in rounds-per-minute and greater than zero.
If the problem persists, feel free to post a ticket on our Discord.