Weapon Hand Location During Animations

I am adjusting some animations to have the characters hand better fit the rifle I am using for my game. In the base animation blueprint, Select the rifle idle animation, then I go to the animation tab, go to the skeleton tree, and change the rotation values on the upper arm, lower arm, hand, and fingers to better fit the rifle being used. I will save it, and the change will carry through the other animations. But when i go into the game and test it, it isn’t showing the changes of the hand placement in the animations. Am I doing something wrong? All I want to do is adjust where the hands are contacting the rifle.

So the solution to my issue was to add FABRIK nodes to my animation blueprints :cool:

1 Like

Each of my weapons are child actors of a weapon class. Spawned and attached at runtime.

For right hand I adjust the location of the skeletal mesh in the bp class.

For left hand I have a socket on the weapon mesh for where I want the left hand to attach. In the anim bp event graph I use “Transform to Bone Space” and a left hand offset variable from the weapon class to create the effector transform. I then use FABRIK to position the hand.

This allows me to adjust in real time for each type of weapon.

1 Like

Am I doing this right, it doesn’t seem to be working

Left Hand Socket…
IK_LeftHand socket is positioned exactly where I want the palm of the left hand to rest. I use the closest inline bone as the parent (b_gun_muzzleflash).

Weapon Parent Class…
The characters l_hand bone is in the wrist. This makes the wrist snap to the IK_LeftHand socket. Thus an offset is used to shift the wrist outward until the palm is at the socket position.

I have a Weapon Config Struct in the weapons parent class. It has a Vector variable for the offset (LeftHandIK_Offset).

Character AnimBP…
In the character anim event graph I have a function that updates the transform. This function is called every frame by executing it on the Event Blueprint Update Animation node.

FABRIK…


This vid shows you how to get a good offset value for the IK_LeftHand vector.
NOTE: You will need to do this for each unique weapon.

1 Like