# What can I do to make the hand hold the grip of the gun even while the character is bending downward or upward?

**URL:** <https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249>\
**Category:** Character & Animation\
**Tags:** unreal-engine, Blueprint, question\
**Created:** [March 30, 2024, 5:10pm UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249 "2024-03-30T17:10:35Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![dabbbbbbbb5656](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dabbbbbbbb5656](https://forums.unrealengine.com/u/dabbbbbbbb5656)\
**Post date:** [March 30, 2024, 5:10pm UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/1 "2024-03-30T17:10:35Z")

</div>

I have a problem implementing the Hand L Goal (related to IK Rig) to attach the grip of the gun so that wherever the gun moves, the hand will follow it. What I tried was setting the Hand L Goal Position to the position of the socket that I had added to the grip, and the Hand L Goal never correctly matches the position of the socket, so I manually moved the socket somewhere far from the grip, but it put the Hand L Goal in the correct position. The problem is that when the character bends downward or upward (using an aim offset), the Hand L Goal is no longer in the correct position that it was before.

Here the character is holding the grip correctly:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/3/b13b3d2c528eff9558e0ccab6b461dd8f3a2bd26.jpeg)

When it aims downward or upward, the hand is no longer holding the grip in the correct place:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/6/a/76af1a52b50b0ceb07fc084fb8ebad513490095d.jpeg)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/5/5854307c6ff7dd7e43ebc6aa5be5f62c93f9477f.jpeg)

Blueprint:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/6/d06f25dfc6147692dfb7475be6b77fea4ba2018b.png)

I tried different transform spaces, but it didn’t give any good results.

What can I do to make the hand hold the grip of the gun even while the character is bending downward or upward?

---

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [March 30, 2024, 5:23pm UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/2 "2024-03-30T17:23:27Z")

</div>

You will need to show the skeleton hierarchy and the node linkages for forward/up/down (from the animation preview view) to be able to debug this.  
Chances are, the parenting of the objects is going wrong somewhere, either in linkage, or in how the data is interpreted.

---

<div class="post-metadata">

**Author:** ![dabbbbbbbb5656](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dabbbbbbbb5656](https://forums.unrealengine.com/u/dabbbbbbbb5656)\
**Post date:** [March 30, 2024, 8:07pm UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/3 "2024-03-30T20:07:00Z")

</div>

I don’t see a problem in the hierarchy.  
This is the animation blueprint where I have set up these:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/d/f/adf8dae8d48c3f4fb6be0c99ac23edea80e53aec.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/6/3/b6387a2df567753ef4032d7ea89888d31239c109.png)

I thought this was happening due to me not setting the position of the Hand L Goal Position correctly based on the target socket in the character blueprint, but I tried setting that position directly in the IK Rig and the same problem happened.

---

<div class="post-metadata">

**Author:** ![TechAnim\_Tools](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/techanim_tools/32/1213818_2.png) [@TechAnim\_Tools](https://forums.unrealengine.com/u/TechAnim_Tools)\
**Post date:** [March 31, 2024, 12:11am UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/4 "2024-03-31T00:11:01Z")

</div>

If the AimOffset poses you’re using have the ik joints ( ik\_hand\_l/r ) that are following the hand\_l/r, you can simply use a two bone ik node after the AimOffset node, where you set the hand\_l/r position using the bone space from ik\_hand\_l/r.  
By doing that you’re fixing the AimOffset lack of precision by forcing the hands towards where they should be.

---

<div class="post-metadata">

**Author:** ![dabbbbbbbb5656](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dabbbbbbbb5656](https://forums.unrealengine.com/u/dabbbbbbbb5656)\
**Post date:** [March 31, 2024, 11:55am UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/5 "2024-03-31T11:55:21Z")

</div>

The two-bone IK was so useful that I didn’t know about it. I created my aim offset even before creating any IK for the character; that must have been causing these problems for me because in the aim offset poses skeleton hierarchy, I don’t see anything to move the bones using the IK that I had created. The aim offset is just using the spine bone for bending down or up; it does not use any IK, and it seems IK is not functional in the poses. In the poses, can there be keyframes for the IK, and is it possible to move bones with the IK goals in the poses?

---

<div class="post-metadata">

**Author:** ![TechAnim\_Tools](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/techanim_tools/32/1213818_2.png) [@TechAnim\_Tools](https://forums.unrealengine.com/u/TechAnim_Tools)\
**Post date:** [March 31, 2024, 4:06pm UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/6 "2024-03-31T16:06:19Z")

</div>

You can use virtual bones within the skeletal hierarchy so that they will follow what the hands are doing.  
The AimOffset doesn’t natively use IK to move stuff around, what it does is to average the poses by blending them, that’s why the hands position is not always reliable.

I suggest you to use virtual bones, create one for each hand ( call them ik\_hand\_l/r ), then after the AimOffset use the TwoBoneIK node for each hand, and set the hand\_l/r transform to be bone space and use the ik\_hand\_lr/r joints, that will solve your issue with the hands alignment.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [March 31, 2024, 7:54pm UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/7 "2024-03-31T19:54:06Z")

</div>

Overall hand IK is a **suggested** destination.  
There is no guarantee what so ever that a given skeleton is able to reach the goal accurately all the time.

You probably want to make a better aim offset animation for grip like weapons so as to mitigate the issue a bit.

But the most important part is likely going to be (like IRL) to tailor or fit the stock of the weapon so that the grip can easily be reached by the skeleton/structure of the specific character.

If you are looking to make characters modular, you probably need to shrink down the weapon size to some arbitrary number or make the grip be a lot less forward than you’d need for larger (longer arms wide shoulder) characters.

Also fwiw an aim offset tracks _all_ bones in an animation and interpolates mathematically the position of the different poses you set. Not “just the spine”.

Last but not least.

With first person you need to look down sight and make AO poses that are precise before you can run any IK.  
With third person no one cares. Simply adjust the weapon to be in the hands at all times (socket it to the forward grip hand not the stock). And you are probably fine to always have the back hand (right for normal people) use IK to adjust in _all_ skeleton sizes.

---

<div class="post-metadata">

**Author:** ![dabbbbbbbb5656](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dabbbbbbbb5656](https://forums.unrealengine.com/u/dabbbbbbbb5656)\
**Post date:** [April 1, 2024, 9:47am UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/8 "2024-04-01T09:47:00Z")

</div>

In the [documentation of Unreal Engine for virtual bones](https://dev.epicgames.com/documentation/en-us/unreal-engine/virtual-bones-in-unreal-engine) they don’t specifically use an aim offset, and they add a Layered Blend per Bone and Apply Additive together. In my setup, I have a problem understanding whether I need to create another Layered Blend per Bone and an Apply Additive node, and even if I create those new nodes, how should I connect the new nodes to my first setup?

Here the Layered Blend per Bone that is connected to the aim offset is using the branch filter for blend mode, but the Layered Blend per Bone under it uses the blend mask for blend mode, so firstly, I don’t know if I need the new Layered Blend per Bone, and I also don’t know where to put it:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/f/e/8fe33aecd15045da841895fe7e1cf779d727e3de.png)

Are you sure Two Bone IK should be after the aim offset and not before it?

I tried the below, and it seems to be fixing it:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/b/3bbd4fc7ad29405575fd53b2174998fc6ce29928.png)

---

<div class="post-metadata">

**Author:** ![TechAnim\_Tools](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/techanim_tools/32/1213818_2.png) [@TechAnim\_Tools](https://forums.unrealengine.com/u/TechAnim_Tools)\
**Post date:** [April 1, 2024, 5:14pm UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/9 "2024-04-01T17:14:47Z")

</div>

First consider that the virtual bones page shows you an example of how to use them, so you don’t necessarely need to replicate the same setup.

Reading again your first post I have to add that I used IK Rigs only for retargeting, never for gameplay purpose, so it might be that is causing some issues there.

Going back to your reply:  
Do you need to have additives? or you’re ok with just having montages from slots?

I suggest you to test one thing at the time, namely Locomotion+AimOffset only, and see if the hands issue is still there, then try to add the TwoboneIK node to eventually fix the hands alignment issue.  
If you notice that even with AimOffset + TwoBoneIK the left hand doesn’t really work as expected and the left arm is over-extended, you may want to update the poses so that the rifle is closer to the body, which will fix the over-extended left arm.

Don’t just add nodes, try one step at the time and see which solution works for you, there are plenty of tutorials/courses around regarding shooters.

---

<div class="post-metadata">

**Author:** ![MostHost\_LA](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mosthost_la/32/907035_2.png) [@MostHost\_LA](https://forums.unrealengine.com/u/MostHost_LA)\
**Post date:** [April 3, 2024, 6:23am UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/10 "2024-04-03T06:23:54Z")

</div>

> [@TechAnim\_Tools](#):
>
> you may want to update the poses so that the rifle is closer to the body, which will fix the over-extended left arm.

Yea no.  
Moving the rifle is not the right way, but it’s the correct “idea”.  
Rather than attempt something you cannot achieve, just attach the rifle to the arm that’s FURTHER away.  
Then you can simply adjust the trigger hand instead, which is going to almost always be reachable, regardless of the character’s size/morphology…

---

<div class="post-metadata">

**Author:** ![Kris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kris/32/758129_2.png) [@Kris](https://forums.unrealengine.com/u/Kris)\
**Post date:** [April 3, 2024, 6:49am UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/11 "2024-04-03T06:49:39Z")

</div>

You may find some useful ideas or info in this post:

> [@Hand IK with different grips](https://forums.unrealengine.com/t/hand-ik-with-different-grips/1318018):
>
> Hello all, I have been doing some investigation into left hand bone IK so that I can adjust the left hand of my character to fit different weapons. However I have noticed that many of the tutorials online work, but only for holding the barrel of the gun or maintaining the original idle animation. So if I were to equip a vertical grip for example, the hand could change its position to be more in line with the grip, but it does not rotate to look like it is holding the grip properly. I was wonde…

---

<div class="post-metadata">

**Author:** ![dabbbbbbbb5656](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dabbbbbbbb5656](https://forums.unrealengine.com/u/dabbbbbbbb5656)\
**Post date:** [April 3, 2024, 2:26pm UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/12 "2024-04-03T14:26:04Z")

</div>

One of the things I find time-consuming is: let’s say I add a weapon to my character in the character blueprint and I adjust its rotation and position, and then I go to the animation blueprint to do some adjustments with the IK, but the weapon is not there! I have to go to my skeleton tree and add a weapon there and adjust it so that it will be visible in the animation blueprint; also, that weapon that I added as a preview to my skeleton tree is not going to be visible in the character blueprint, and I have to use sockets for it. Since you have worked with different weapons, is this the normal workflow that you add all your different weapons to your character’s skeleton tree as preview assets, then you adjust the poses in the animation blueprint for different grips, and then you need to add the weapons to the character blueprint again via sockets and adjust their positions and rotations again? There is no guarantee that these positions are going to match with the poses you create in the animation blueprint.

---

<div class="post-metadata">

**Author:** ![TechAnim\_Tools](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/techanim_tools/32/1213818_2.png) [@TechAnim\_Tools](https://forums.unrealengine.com/u/TechAnim_Tools)\
**Post date:** [April 4, 2024, 6:58pm UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/13 "2024-04-04T18:58:58Z")

</div>

If you make an official tutorial within Epic learning hub it would be easier to find and share, since the infos there ( and maybe adding a more in depth showcase of the ABP setup ) are very useful.

---

<div class="post-metadata">

**Author:** ![Kris](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kris/32/758129_2.png) [@Kris](https://forums.unrealengine.com/u/Kris)\
**Post date:** [April 6, 2024, 6:53am UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/14 "2024-04-06T06:53:18Z")

</div>

One day perhaps, but I’d have to sit down and update it to Unreal Engine 5 and probably convert it to use a Control Rig instead.

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [May 6, 2024, 6:53am UTC](https://forums.unrealengine.com/t/what-can-i-do-to-make-the-hand-hold-the-grip-of-the-gun-even-while-the-character-is-bending-downward-or-upward/1779249/15 "2024-05-06T06:53:49Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
