UE5 Blueprint FPS : Aiming using Enhanced Input Mapping

So, coming into another issue where the depreciation of action mapping is biting me in the rear with this lesson. I need to implement aiming down sights of the gun using the enhanced input mapping but when I tried to do that it didn’t work. So, I created the IsAiming variable like the lesson asks and created the mapping for aiming using right mouse button within the Input Mapping Controller file but when I try to use the Input Action that I made for aiming it doesn’t seem to work.

Here is the Input Mapping Controller

Here is the Input Action

And here is my character blueprint where the nodes are set up to make it so right mouse button with trigger the IsAiming variable.

Any help is greatly appreciated!

For the Input Action node inside your Player Blueprint, it is only turning it on. On complete or cancel you should be turning that Boolean to false. Sadly I personally don’t have contextual understanding, I haven’t done that course yet. But the animation blueprint itself should be doing something based on that Boolean.
Travis

Even with the nodes set up this way it only remains false. When I press the RMB it doesn’t trigger at all. I expected it to switch to True once I press RMB but that doesn’t happen either. I’ve got a print string node attached at the end that shows me whether it is true or not.

Then let me introduce console commands. Press ‘ or ~ (the top left most button on a keyboard) and type“ShowDebug EnhancedInput” .

At work presently, but when I get a chance to I’ll definitely give that a go and let you know what it says there. Thanks for helping me out with this a bit!

If you want to continue with enhanced input, you’re going to want to make use of the Started and Completed pins for IA_Aim. I’m going to assume that the rest of your input actions work. The issue may also be that the viewport isn’t focused before trying out the keybind, easy fix is the left-click on the viewport when you press play.

As a side-note, just because the old input is current listed as “deprecated” doesn’t mean it can’t be used. It’s good that you’re challenging yourself with trying out the Enhanced Input system. But you are still able to follow the course with the old system.

Using the old input action mapping won’t create issues down the road?

Okay, so I ran the debug during play and this is what showed up. Looks like it recognizes when I press the RMB it just doesn’t apply it to the input action for aiming.

Hey! I figured it out!
It’s just how I had everything wired in. Like a dummy, nothing was connected correctly.

This is it originally was plugged in and why it failed.

And this is how it should have been plugged in. Now I can toggle the IsAiming variable in the animation blueprint perfectly.


To the left of “Cast to FPS_AnimBP” is the “Event BeginPlay” node and to the right is the rest of my character controller.

Hopefully anyone else with this issue can see this.

Only if you upgrade your project to a version of Unreal that has it removed entirely.

That’s great to hear. It’ll come in handy at some point I’m sure. If anything when I get tired of trying to figure out the Enhanced Input system.

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

Privacy & Terms