Download

UE does not bind new inputs!!! HELP !!!

Hello. Help me please. UE does not bind new inputs. And when you delete the old ones, everything continues to work as if they were. What could be the problem?

What does “new inputs” mean?

You generally set up input actions and axes in the Project Settings → Inputs … panel.

You must then read those axis/actions in your Player Controller, and decide what to do with them, poking instructions at your possessed Pawn to make the pawn do the right thing.

If there is some code that uses “on event key W” instead of “on axis Move Forward” then changing the axis won’t change the behavior, because the actor is listening for the “key W” not for the re-mappable “axis forward.”

Here is the generated input, blueprint, class and code.
When you right-click, nothing happens.

wNcuo5_82tE.jpg

P-cuqCJDc6o.jpg

void ATest_Char_class::OutputLog()
{
UE_LOG(LogTemp, Warning, TEXT(“AimingTrue”));
}

// Called to bind functionality to input
void ATest_Char_class::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
PlayerInputComponent->BindAction(“Aiming”, IE_Pressed, this, &ATest_Char_class::OutputLog);
}

PlayerController is not your class, right? It’s just the base controller which does nothing by default.

In general, you’ll want to put your input decoding code in your custom Controller class, not the Character class itself.

Be very careful, when consuming inputs in several places. You are consuming the Aiming input in C++ with the binding with “OutputLog” and with “Print String” in BP.
If you want to consume in both places, be sure to uncheck the “Consume Input” in “InputAxis Aiming” BP node or remove the binding in C++ or bind it to a *BlueprintNativeEvent *function or something.

](filedata/fetch?id=1774979&d=1591952658)