Unbind default pawn key

Hey, i wanted to use a default pawn for something, but the wasd key keeps getting assigned.

I only want it to have one button assigned, but i can’t find a way to unassign the “WASD” buttons

For example, let’s say i want to use a azerty layout, but if i assign “Q”, to moveleft, then it moves left, but down too since by default, “Q” is assigned to go down.

Edit → Project Settings → Input then look under action mappings. This should change the default move keys.

If you mean you want to have multiple options on how to move, then you could create a variable for the layout, then if the variable is 1, then w moves the player forward. If the variable was 2, then w would move the player left.

I alredy have my azerty inputs in it, in the “default pawn class” you don’t have to add anything, it has some movements already integrated in it without adding any movement input in the event graph or in the project settings, but then it interferes with my own inputs

See my edit.

I might be misunderstanding you, but the way you explained it makes me think… why not just delete the other movements?

that’s exactly what i want to do and i’m asking here how to do that haha ^^ it is integrated in the default pawn class, it’s written nowhere in the event graph or in the project settings, so i don’t know how to do that

it’s the only class that behaves like this but i need it, i can’t find a way to unassign the built in default inputs of this class

Ah now I understand :slight_smile: So the class your pawn is inheriting from has the WASD movements in it. If you don’t need the WASD movements at all, you could just go into the parent class and get rid of it. If you do need it, you can probably override them somehow, and tell them instead of moving, do nothing.

the parent class is Default Pawn, i’m not using child class, i’m directly using the Default Pawn, and it has nothing anywhere, i think it’s maybe written in the source code of the class because i can’t find the “wasd” mapping anywhere

At the top class it should say “Parent Class: Pawn” Or something like that. If you have a little knowledge of C++, you may be able find the movement and delete that part of the code. I’m not great with C++ myself, so I won’t be of much help there. Other than that, I don’t see any other way of accomplishing this.

If you want to disable the default pawn key bindings, under pawn settings there is a “Add Default Movement Bindings”. If you uncheck this, it will no longer do the default bindings, getting rid of any unwanted movement.

1 Like

Is there a way to disable just one of the default key binding and not all of them? Like, I want to disable ‘E’ and ‘Q’ only but keep the WASD movement.

1 Like

it seems the only way is to comment out the C++ code in Engine\Source\Runtime\Engine\Private\DefaultPawn.cpp:111~112

	UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::E, 1.f));
	UPlayerInput::AddEngineDefinedAxisMapping(FInputAxisKeyMapping("DefaultPawn_MoveUp", EKeys::Q, -1.f));