I want to add new inputs to control the camera in my game, those concerning my mouse work perfectly, but those concerning my keyboard (like W A S D) do not work. I carried out simple tests by just wanting to display a “Hello” with the print function, but even for that no text is displayed on the screen.
OK… As first… Don’t set axis twice… I mean… No MoveLeft + MoveRight… Just do a MoveH and put two keys inside with the ± values.
Second… Never do values other than ±1. I mean… Never do 100 or -100.
Change them to 1 and -1 and when you call the event, multiply it with a Variable… Best from the GameInstance… That way you can change speeds and values right from the game… Instead if struggling with them in the Input Preferences.
Third.
To your Question:
Do you have Input Events of the same type elsewhere in your Codes? Cause… If yes… And their events consume the input… the inout is gone for all other events… And so… Not fired anymore.
Second idea… Even if the mouse works… Try the EnableInput Node, placed in your Begin play… And connect your Player Controller as Input Caller… That way you make sure the PC is sending Inputs to the Actor, without struggling with the Auto Input Settings…
I did what you told me to do, but it didn’t change anything.
The only other inputs I have are the mouse wheel to be able to zoom in and out in game. After that I also have the “Event BeginPlay” and the “Event Tick” but I don’t think that’s what you’re asking me.
On the other hand, by doing other tests I realized that after the “left mouse button” event was activated once, the inputs concerning my keyboard work correctly.
That the normal behavior… Now we got the point…
When yoi start your game via play in editor (no matter if in viewport, new pie or standalone), you need to give the new window/viewport focus…
So… You need to click inside it one time to active focus and input handling.