How can I read Axis Values in blueprint when I'm setting the input in C++?

void MoveForward(float AxisValue);
void MoveRight(float AxisValue);

void ACharacterPlayer::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
PlayerInputComponent->BindAxis(TEXT(“MoveForward”), this, &ACharacterPlayer::MoveForward);
PlayerInputComponent->BindAxis(TEXT(“MoveRight”), this, &ACharacterPlayer::MoveRight);
}

So this is working I can move around, but I want to access the axis values so I can use them in a blueprint.

Any advice appreciated, thanks :slight_smile:

What have you tried so far? Saving the axis values in a BlueprintReadOnly variable, implementing a BlueprintNativeEvent, …

Also, is the movement so complex, that requires you to implement it in C++?

UPROPERTY(BlueprintReadOnly)
float ForwardMovement;

UPROPERTY(BlueprintReadOnly)
float RightMovement;

ForwardMovement = GetInputAxisValue(“MoveForward”);
RightMovement = GetInputAxisValue(“MoveRight”);

Thanks, Solved it with these per your suggestion and works fine. :slight_smile: