FPS aiming not working???

I’ve been following this video: 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


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.

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.

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?

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


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.






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?

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.






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?

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.

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

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 :blush:

1 Like

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?

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

1 Like