Problem with creating character movement with blueprints




My character doesn’t want to move forward or backward, as well as moving left and right. Can anyone help me please?

There is no inherent problem in the blueprints you’ve shown.

I think you might have messed up your Mapping Context or your Enhanced Input Actions or the way you use them.

Check if linking AddMovementInput() to “Ongoing” instead of “Triggered” in your Enhanced Input Actions will make any difference first. Depending on how they are setup they might trigger only at the start of the input.

Update: When I restart unreal engine and try it on default map with default gamemode it works. But when I try it with my own map and my own gamemode it don’t work.

Hey @434eb3b9dc1a4b44be6ca3469292740f!

Aside from assigning your custom game mode, you should also set the default pawn class.


If your game mode is a blueprint class, navigate to the World Settings window on the bottom right and type in “game mode” (where you assigned your custom game mode), and select your player character BP from the dropdown menu next to the Default Pawn Class property.


If your game mode is a C++ class however, that section would be greyed out. So you’d need to set the default pawn class from your game mode cpp file. And here’s how you set the default pawn to a blueprint class:

#include "UObject/ConstructorHelpers.h"

//...

static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/[Directory under the Content folder]"));
if (PlayerPawnBPClass.Class != NULL)
{
	DefaultPawnClass = PlayerPawnBPClass.Class;

}

Hope this helps! :innocent:

I already did that. It didn’t help.

Well apparently the problem is in your GameMode or the map.
Try it just on a new map with your custom GameMode and if it fails again then the GM is the culprit.
Then you might show us the code/BP of your GameMode

I give up.


Please help. when I press D it turns to the left and goes to the left. Same for A but to the right.
S-strangely goes to the left instead of backward. W-don’t work at all.
All screnshots are already provided.

Have somebody got any ideas? I am exhausted.