# Procedural aim-down-sights results in improper translation

**URL:** <https://forums.unrealengine.com/t/procedural-aim-down-sights-results-in-improper-translation/1536944>\
**Category:** Character & Animation\
**Tags:** aiming, unreal-engine, fps, question, Blueprint\
**Created:** [December 19, 2023, 12:20am UTC](https://forums.unrealengine.com/t/procedural-aim-down-sights-results-in-improper-translation/1536944 "2023-12-19T00:20:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samathan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/samathan/32/1058905_2.png) [@Samathan](https://forums.unrealengine.com/u/Samathan)\
**Post date:** [December 19, 2023, 12:20am UTC](https://forums.unrealengine.com/t/procedural-aim-down-sights-results-in-improper-translation/1536944/1 "2023-12-19T00:20:56Z")

</div>

I’m trying to develop a procedural aim-down-sights system that will use IK to move the player’s hand to a location such that the sight of any weapon (determined by a “Sight” socket on each weapon) is aligned with the player’s camera.

To do this, I tried to get the camera’s transform and modify it by a small offset so the desired location is a little bit behind the sight, not right inside of it. Then, I tried to get the difference between the “Sight” socket and the bone that the weapon itself is attached to, i.e. the ik\_hand\_gun bone, which is the bone that will be moved to move the weapon.

[When I do all of this, I get this result (ignore any movement from the visible hands; none of this code affects them yet).](https://www.youtube.com/watch?v=BmRA5b-umsg)

I’m hoping someone can help me figure out what’s going wrong here? Here’s some screenshots of the relevant scripting:

 ![Screenshot 2023-12-18 161652](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/d/3/1d3bb0382efac7141f3c28d6df24423dfd87119b.jpeg)

 ![Screenshot 2023-12-18 161725](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/f/4/9f4e3747c6917336d02a34742c7390297907778c.png)

If it’s not obvious, I’m still learning the animation system and am not super proficient with it. Thanks in advance for any help!

---

<div class="post-metadata">

**Author:** ![Samathan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/samathan/32/1058905_2.png) [@Samathan](https://forums.unrealengine.com/u/Samathan)\
**Post date:** [December 20, 2023, 9:23am UTC](https://forums.unrealengine.com/t/procedural-aim-down-sights-results-in-improper-translation/1536944/2 "2023-12-20T09:23:26Z")

</div>

Wow, I’m a dunce. There’s nothing wrong with this code. My “Sights Mesh” was just wrong and I somehow didn’t notice. When I fixed it, everything worked as intended.

---

<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:** [January 19, 2024, 9:23am UTC](https://forums.unrealengine.com/t/procedural-aim-down-sights-results-in-improper-translation/1536944/3 "2024-01-19T09:23:29Z")

</div>

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