# FPS aiming not working???

**URL:** <https://forums.unrealengine.com/t/fps-aiming-not-working/2022821>\
**Category:** Blueprint\
**Tags:** bug, aiming, aim, unreal-engine, fps, ads, question, Blueprint\
**Created:** [September 16, 2024, 9:42am UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821 "2024-09-16T09:42:05Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![SS\_Limecup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SS\_Limecup](https://forums.unrealengine.com/u/SS_Limecup)\
**Post date:** [September 16, 2024, 9:42am UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/1 "2024-09-16T09:42:05Z")

</div>

I’ve been following this video: [https://youtu.be/-c8g2UajiO0?si=jByZw61KEyoI4ogf](https://youtu.be/-c8g2UajiO0?si=jByZw61KEyoI4ogf)

I’ve done every step, I’ve tripled checked every node. Still seems like I can’t aim at all. I provided a video of my issue down below and some images. I assume my Right Mouse Click isn’t being casted to my anim blueprint. But I still have no idea what is going on. Can anyone let me know what I’m doing wrong?  
[https://youtu.be/j-DYnL5v3KI](https://youtu.be/j-DYnL5v3KI)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/f/67fb98369f4a1f1d970ed83e29dabd4c9f1104b7.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/1/b3159fd3ba02260a631dea7194d2f09175608ae2.jpeg)

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [September 16, 2024, 9:47am UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/2 "2024-09-16T09:47:06Z")

</div>

You’re not setting the bool type variable that represents the activation of right click that has been declared in the character blueprint to another bool type variable that will be used for the transition conditions in your animation blueprint. But you’re doing the opposite. You should set value of the one you cast from the character blueprint to that one.

---

<div class="post-metadata">

**Author:** ![SS\_Limecup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SS\_Limecup](https://forums.unrealengine.com/u/SS_Limecup)\
**Post date:** [September 16, 2024, 8:48pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/3 "2024-09-16T20:48:11Z")

</div>

Hi, thank you for the idea but I re-did the bool and everything. I made sure it is casted from the character and I fixed the code. It still does not register the right click.

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

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [September 16, 2024, 8:53pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/4 "2024-09-16T20:53:55Z")

</div>

Could you please provide more info? By saying the right click doesn’t register, do you mean the input action doesn’t even get executed in the character blueprint? Or does the cast succeed in the anim blueprint? Could you do some more debugging by placing a bunch of print string nodes here and there, read the results of the original and the anim blueprint version of the aiming variable, and send some screenshots of your blueprints with the full code related to this issue, including the states and the transition conditions between them in your anim graph?

---

<div class="post-metadata">

**Author:** ![SS\_Limecup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SS\_Limecup](https://forums.unrealengine.com/u/SS_Limecup)\
**Post date:** [September 16, 2024, 8:58pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/5 "2024-09-16T20:58:16Z")

</div>

Hey, so it does register when I right click. What I mean is, it does not cast over to the anim blueprint.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/7/707cfa97458d76879c3e903c5d32d57de0b65cf5.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/6/c/46ce087c0c2e19df6275ee4cd8f201b3458f907a.jpeg)

The images above prove that I am clicking the button.  
I added print strings at the end of the Event Graph in the Anim Blueprint below. And it casts perfectly fine.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/2/8/e286bde4d50c2b9de26e7b08e3dd964d03450643.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/8/e/78ee90626c0e22a25a00b1ab5bcba7791c229e0e.jpeg)

---

<div class="post-metadata">

**Author:** ![SS\_Limecup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SS\_Limecup](https://forums.unrealengine.com/u/SS_Limecup)\
**Post date:** [September 16, 2024, 8:59pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/6 "2024-09-16T20:59:58Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/a/2/ca210a6891e443ce6addbbdc5cc6cc8b5bba8c77.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/a/e5a23d4d156b3987b132e75d21ad909c572fb90d.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/d/fbdbe81197d2e1601fddab9a86cc8eb856f5970b.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/3/053b489e900c96c67971dddc1566cb01e67da6b5.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/3/7d3928e9541e4c9ec4e85b43c459dc0f2bdf892a.jpeg)

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [September 16, 2024, 9:10pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/7 "2024-09-16T21:10:40Z")

</div>

Since you showed that right clicking does work, therefore sets the aiming variable to true when it’s pressed, and the print string node does get triggered on the same execution chain where the anim blueprint’s aiming variable gets set, I’m assuming it also gets set to true so I’m not gonna ask you to read that value. Now, it seems fine. I couldn’t notice anything looking at all the necessary screenshots you’ve provided. So I think it’s not about the code but rather has something to do with animations. I see your aiming animation is a blend space which is connected to a float type variable. Could you try changing the animation that is supposed to play when you right click? Just to make sure that it gets triggered. Maybe it’s about that variable not returning a value greater than 0, or maybe it’s about the slots. Worth a shot in my opinion. In your next reply, could you provide the results of changing the animation in that aiming state _(don’t switch it with another blend space)_ and what happens when you unplug that slot from your main out pose?

---

<div class="post-metadata">

**Author:** ![SS\_Limecup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SS\_Limecup](https://forums.unrealengine.com/u/SS_Limecup)\
**Post date:** [September 16, 2024, 9:20pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/8 "2024-09-16T21:20:51Z")

</div>

Okay so I did change the animation down below. I think the issue is that the animation is not returning to a greater value than 0. I decided to move the “Aiming” state to transition to and from the “Running” State and I can now Aim down sights. But I still can’t Aim down sights when idle.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/a/cfac35c7888aa3313bc2e18df59e888d8c0629df.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/b/dcbe1f73d47ba4f3660d9e0126efaa93cf0e500f.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/e/cdeda34a154ab408da511394a369e51fd3cdf5ed.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/7/4e70ab45d5c532f2f5d7722d3e9c35d903967fd7.jpeg)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/f/01fbd710b13f3cb4d47e2100dd180badbf02b684.jpeg)  
AS you can see if I move I can aim, but if stop moving and try to aim while idle, I cannot aim. How would I be able to fix that?

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [September 16, 2024, 9:23pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/9 "2024-09-16T21:23:00Z")

</div>

I’m confused on why you’re trying to handle the aiming logic there in the first place if you’re aiming for a dynamic movement and not just a transition between holding the weapon down and aiming. Could you please clearly explain your objective? Are you trying to move left right up and down when you hold right click? That’s not something you achieve using animation states.

---

<div class="post-metadata">

**Author:** ![SS\_Limecup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SS\_Limecup](https://forums.unrealengine.com/u/SS_Limecup)\
**Post date:** [September 16, 2024, 9:27pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/10 "2024-09-16T21:27:37Z")

</div>

Well the Ground Speed was supposed to be the speed of your walk while aiming.

---

<div class="post-metadata">

**Author:** ![VisAgilis](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/visagilis/32/891043_2.png) [@VisAgilis](https://forums.unrealengine.com/u/VisAgilis)\
**Post date:** [September 16, 2024, 9:40pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/11 "2024-09-16T21:40:17Z")

</div>

I think there’s a communication problem, let me clarify. If you’re normally holding the weapon down on the idle pose and want to align the scope of your weapon to the player while aiming, you can indeed use animation states to perform that transition. And I initially assumed that the goal for plugging the movement speed to that animation was to make the arms jiggle more the faster the player is _while they’re in the aiming pose_ but that’s it! You don’t implement the aiming logic itself using animation states, but you should rather use blueprints. I assume you’re already able to move the camera to the direction of the input, like you’re able to look around while you’re not holding right click, is that right? But you can no longer do that while the aiming animation plays, is that it? If so, it’s probably because you’ve set the camera to rotate with the head _(or a bone or a component related to the arms if your character doesn’t have a head)_ which forces you to look to a direction according to the animation. You can solve that simply by breaking that connection and make the arms rotate according to the camera instead. Don’t worry, this way the animations would still play as intended 😊

---

<div class="post-metadata">

**Author:** ![SS\_Limecup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SS\_Limecup](https://forums.unrealengine.com/u/SS_Limecup)\
**Post date:** [September 16, 2024, 9:50pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/12 "2024-09-16T21:50:55Z")

</div>

Thank you so much! This really helped a lot! Now I can move around and aim just fine. Yes, I am planning to retouch the code up in the blueprints though! One more question, so I can move around fine and aim when I move, but once I stop I can no longer aim. How would I fix that?

---

<div class="post-metadata">

**Author:** ![SS\_Limecup](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SS\_Limecup](https://forums.unrealengine.com/u/SS_Limecup)\
**Post date:** [September 16, 2024, 9:54pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/13 "2024-09-16T21:54:29Z")

</div>

Actually no, I fixed it right now by just making a new state for the idle aiming! Thank you so much for the help!

---

<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:** [October 16, 2024, 9:54pm UTC](https://forums.unrealengine.com/t/fps-aiming-not-working/2022821/14 "2024-10-16T21:54:59Z")

</div>

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