GetAxisValue Trouble. Player Controller Input

Making a Player Controller with Input Component set up, as a way to clean axis inputs into a simple 8 direction outputs.

since I just want to get the Axis Values from My BindAxis Inputs, and check if there is a combination of , for example going right and going down (would output a single diagonal output), before I call any functions, I thought I could use the secondary overload of BindAxis, paired with a GetAxisValue in my Tick Component.

I cant get any values from my GetAxisValue(FName(“RightAxis”). just zeros.


#pragma once

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "CharacterPlayerController.generated.h"

class ROADOFPUNCHING_API ACharacterPlayerController : public APlayerController

	int RightArray;
	int UpArray;
	virtual void SetupInputComponent() override;
	int DirectionPadOutput();

	virtual void PlayerTick(float Deltatime);

---------------------------- .cpp --------------------------------------------

// Fill out your copyright notice in the Description page of Project Settings.

#include "CharacterPlayerController.h"
#include "Components/InputComponent.h"

void ACharacterPlayerController::SetupInputComponent()


int ACharacterPlayerController::DirectionPadOutput()
	float RightAxisValue = InputComponent->GetAxisValue(FName("RightAxis"));

	UE_LOG(LogTemp, Warning, TEXT("%f"), RightAxisValue);

	float UpAxisValue = GetInputAxisValue(FName("UpAxis"));

        UE_LOG(LogTemp, Warning, TEXT("%f"), UpAxisValue);

	// bunch of code for checking for diagonal inputs with a 2d array that i omitted

void ACharacterPlayerController::PlayerTick(float Deltatime)
//	UE_LOG(LogTemp, Warning, TEXT("axis %f"));

Thanks again super guys

After much Toil I realized I Had failed to Finish My PlayerTick Function with a Super::PlayerTick(Deltatime); meaning no input anywhere was being checked.

my Input Check to circumvent BindAction in tick function looks like this now.

bool ACharacterPlayerController::CheckKey(FName ActionName)
	TArray<FInputActionKeyMapping> ActionKeyArray = (PlayerInput->GetKeysForAction(ActionName));
	for (size_t i = 0; i < PlayerInput->GetKeysForAction(ActionName).Num(); i++)
		CheckRight = PlayerInput->IsPressed((PlayerInput->GetKeysForAction(ActionName)[i]).Key);

		if (CheckRight == true)
			return true;
			UE_LOG(LogTemp, Warning, TEXT("%s"), ActionName);