Ignoring Add Movement Input again

Hello,

I’ve been stuck on this for some time, but I have a character setup and when I use Add Movement Input it doesn’t move the character at all.

I now isolated the problem and found out that if I create a new game mode but not put any code in the blueprint and then set the default pawn to my chararacter, the add movement input will work. But If I create my own GameMode and manually spawn the character actor and then possess it that add movement input won’t work. (see screenshot 2).

Screenshot 1 shows my chararcters code’(Yes the key bindings behind moveforward are defined and have set the scale correctly).
SCreenshot 2 shows how I am manually spawning it and possesing it.

So, if I create a new game mode and use default behaviour (Don’t override onPostLogin or set player character events) and set the default pawn to the character, the character will spawn and I wil be able to control.
if I use a gamemode that has the code you see in my screenshot, the character won’t respond to movement inputs.

I figured it out, and the solution is really lame on epics part…

Turns out if your custom GameMode inherits GameModeBase and also your GameState inherits GameState instead of GameStateBase, Add Movement Input will fail in that exact combination. Thanks Epic!

Thats because AGameState and AGameMode highly depend on each other.(Which also affects the Initialization of Players) If you want to use one of them, you need to use the Mode/State counterpart, too.

Holy moly! I’ve got the same problem today and this is just smth. Thanks for posting your Question and answer, this really is weird in my understanding and if someone bumps into the same ■■■■, they’ll know the solution. Ty!