Input Axis is always zero

Hello there!

I’m using Unreal Engine 5.1 I know it is deprecated but I want know why this happens.

The Input Axis Event node I set in the blueprint is always returns zero even if I pressed the
exact key that I set in the Axis Mapping.

I’m using the Input Axis Event in a spawned PlayerController, which I want to use it to control my character.

I tried to set the Input Mode Game Only but it not worked.

Does anyone have any ideas?

Can you show the input setup?


I’m using the Input Axis Event in a spawned PlayerController, which I want to use it to control my character.

You spawn a controller? Why?

Can you show the input setup?

Ok! I’ll show it later, it is really simple!

You spawn a controller? Why?
Yes, I am new here and I just thought it will get more customizable if I spawn my own PlayerController instead of using the default one, such as I can control when to spawn it or decide how to initialize it, even when to destroy it. I’m preferred to do it all by myself. Am I wrong?

Here is my blueprint. It is very simple. And I have already checked “Override Player Input Class” setting, it is set to “PlayerInput”(Even it is suggested to use the new Enhanced Input Action, I’m using the deprecated one.)

The “Set Character Move Direction Forward Backward” is a function that I created to control the character movement.

I meant the input here:

I bind it like this!

So… this does not print or it prints 0?

It is always prints “0.0” no matter if I pressed the W/A/S/D on my keyboard or not.

The blueprint was execute in a PlayerController blueprint, and the PlayerController is not a default PlayerController, I spawned it in a GameMode blueprint as an actor.

When you say spawned, did you manually spawn it or let the Game Mode spawn it?

Another thing that is confusing:

This says Self Possessed Target which would indicate this script in a Pawn but you also say:

The blueprint was execute in a PlayerController blueprint

So where is this script actually? It’s your controller probably. And it would not explain axis outputting zeros. Hm.

Do you use this Axis input anywhere else?

Thank you for your reply!

I mean to manually spawn it in a Game Mode blueprint by using the “Spawn Actor” node.

This is the actually blueprint I am using. These nodes above, I’m sorry for my confusion,I means I put them in a “PlayerController” blueprint, the “Self Possessed Target” is a reference to a actually pawn. So I put the nodes in my “PlayerController” blueprint, and want the “PlayerController” to call the method that I wrote in the “Pawn” class(Actually I made my own “Character” class inherited from the base “ACharacter” class).
As the Class name “PlayerController” shows, I think it is better to put the InputAxis in the “PlayerController” than in a “Character” or a “Pawn”.

No, I only uses it here.

This is HIGHLY unusual. I’d start with this. Make sure the level is using the Game Mode, ensure the Game Mode has the desired controller assigned:

You can assign the pawn here too - but that’s optional.

1 Like

Essentially it prints because it’s spawned and out there in the world, working but unable to process inputs since you’re not actually using that controller.

1 Like

See if you are running into this ancient issue :slight_smile:

1 Like

Yeah…now I know that I shouldn’t manually spawn the PlayerController. Maybe that caused all of this. I will try to use the default PlayerController and try if it will work.

Thank you very much!!

1 Like

Using the default spawned PlayerController instead of manually spawned PlayerController, it just ALL WORKED FINE! Thank you very much!

1 Like