# Third person aiming issues

**URL:** <https://forums.unrealengine.com/t/third-person-aiming-issues/421251>\
**Category:** Blueprint\
**Tags:** aim-space, unreal-engine, question, Blueprint\
**Created:** [March 29, 2018, 7:09pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251 "2018-03-29T19:09:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![FredPoissant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FredPoissant](https://forums.unrealengine.com/u/FredPoissant)\
**Post date:** [March 29, 2018, 7:09pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/1 "2018-03-29T19:09:59Z")

</div>

Hi!

I am building a third person shooter with the third person starter pack and I am having an issue with my aiming.

When the weapon is at hip level the character can move freely from left to right but I would like to make it strafe when pointing the gun forward. I tried some stuff in blueprint but I can’t seem to find the right way to do it.

Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![Trueform](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trueform](https://forums.unrealengine.com/u/Trueform)\
**Post date:** [April 9, 2018, 10:37am UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/2 "2018-04-09T10:37:17Z")

</div>

The answer to your problem is with the Yaw controls.  
i don’t know how you’ve set up your aim, but you should have a button for aiming down the sights. You need a branch from this that sets the ‘Use Control Rotation Yaw’ to true when you are aiming down the sights, and False when you release the button.  
That way, your character will always face forward when you are aiming.  
Hope this helps!

---

<div class="post-metadata">

**Author:** ![FredPoissant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FredPoissant](https://forums.unrealengine.com/u/FredPoissant)\
**Post date:** [April 9, 2018, 4:18pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/3 "2018-04-09T16:18:29Z")

</div>

Thank you Trueform, yes that was the missing node. That being done it creates another problem though. When I aim, I move my camera over the character’s right shoulder as to not aim right behind its head, but depending on where I am facing in world rotation, my camera seems to also rotate and do not stay over the right shoulder, so I might end up aiming properly when I aim at world yaw = 0 (image 1), but behind its head when its at yaw = 90 or -90 and over the left shoulder when its at 180 (image 2)

 ![236157-screenshot-34.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/a/faa8dc12ac68b15abc42d917cdf62038169b46d6.jpeg)

.

How should I lock the camera rotation in place so I’m always aiming over the right shoulder?

 ![236156-screenshot-33.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/5/5/7559766e80a23c3d37b45889fd65b1eea7af82fb.jpeg)

---

<div class="post-metadata">

**Author:** ![FredPoissant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FredPoissant](https://forums.unrealengine.com/u/FredPoissant)\
**Post date:** [April 9, 2018, 4:19pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/4 "2018-04-09T16:19:02Z")

</div>

Actually the right image is the second one.

---

<div class="post-metadata">

**Author:** ![Trueform](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trueform](https://forums.unrealengine.com/u/Trueform)\
**Post date:** [April 9, 2018, 4:30pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/5 "2018-04-09T16:30:11Z")

</div>

No problem, I’m pleased it worked! As for the second issue, having never tried myself I’m not too sure… if I were to hazard a guess, though, I’d look into the clamp option. You can find a similar problem here:

[https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/36802-limiting-camera-rotation](https://forums.unrealengine.com/development-discussion/blueprint-visual-scripting/36802-limiting-camera-rotation)

It should do what you want it to, more or less.

---

<div class="post-metadata">

**Author:** ![FredPoissant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FredPoissant](https://forums.unrealengine.com/u/FredPoissant)\
**Post date:** [April 9, 2018, 6:11pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/6 "2018-04-09T18:11:42Z")

</div>

My issue seems to be that my camera is also rotating, not only the spring arm and I can’t find how to stop that without locking everything in place, which is what clamping does.

If the spring arm were to rotate with the player and the camera to keep pointing forward, my issue would be resolve, but I’m not very familiar with camera and spring arm settings.

---

<div class="post-metadata">

**Author:** ![Trueform](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trueform](https://forums.unrealengine.com/u/Trueform)\
**Post date:** [April 9, 2018, 7:01pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/7 "2018-04-09T19:01:13Z")

</div>

'm not sure I can be much help there, sorry. I’m still learning things myself, and I’ve only just started looking at aiming and spring arms. I assume you’ve tried referencing just the spring arm itself in the blueprint, but keep trying - there’s always a way to do these kinds of things. Maybe learn all you can about the camera elements, and everything will fall into place.

---

<div class="post-metadata">

**Author:** ![FredPoissant](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FredPoissant](https://forums.unrealengine.com/u/FredPoissant)\
**Post date:** [April 9, 2018, 7:38pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/8 "2018-04-09T19:38:51Z")

</div>

The problem was with the spring arm. I was using a timeline to change between two camera offsets to get it from behind the character to over the shoulder. I was doing so by changing the values of the camera boom’s target offset using a timeline. It was a good idea, but, the target offset was updating improperly with the pawn’s rotation, I had to update the socket offset instead, which keeps relative to the pawn’s rotation, thus always behind.

---

<div class="post-metadata">

**Author:** ![Trueform](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trueform](https://forums.unrealengine.com/u/Trueform)\
**Post date:** [April 9, 2018, 7:44pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/9 "2018-04-09T19:44:49Z")

</div>

I looked at my current project, and mine seems to do everything you want yours to. I’ve added an attachment for the blueprint so you can see how mine works. In addition, try this tutorial:

it explains the timeline I added, and it really helped me understand cameras more. I changed a few things on the blueprint myself to prevent aiming while jumping, etc, but hopefully it will solve your problem.

 ![236915-aim.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/a/6/9a68b61ad560c6046b18d578a6f33f3bc3db07ad.png)

---

<div class="post-metadata">

**Author:** ![Trueform](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Trueform](https://forums.unrealengine.com/u/Trueform)\
**Post date:** [April 10, 2018, 12:06pm UTC](https://forums.unrealengine.com/t/third-person-aiming-issues/421251/10 "2018-04-10T12:06:13Z")

</div>

At least you fixed it!
