MoveForward is not a name of any input axis

Hello
Im just started blank project and swap DefaultPawn to ASandboxPawn

// Copyright Epic Games, Inc. All Rights Reserved.


#include "GeometrySandboxGameModeBase.h"
#include "SandboxPawn.h"

AGeometrySandboxGameModeBase::AGeometrySandboxGameModeBase()
{
	DefaultPawnClass = ASandboxPawn::StaticClass();
}


Then mapped axis
image

On my pawn i setup a PlayerInputComponent

// Called to bind functionality to input
void ASandboxPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
	Super::SetupPlayerInputComponent(PlayerInputComponent);

	PlayerInputComponent->BindAxis("MoveForward", this, &ASandboxPawn::MoveForward);
	PlayerInputComponent->BindAxis("MoveRight", this, &ASandboxPawn::MoveRight);

}

Then make function that

void ASandboxPawn::MoveForward(float Amount)
{
	UE_LOG(LogSandboxPawn, Display, TEXT("Move Forward: %f"), Amount);
	VelocityVector.X = Amount;
}

void ASandboxPawn::MoveRight(float Amount)
{
	UE_LOG(LogSandboxPawn, Display, TEXT("Move Right: %f"), Amount);
	VelocityVector.Y = Amount;
}

Then on tick update the NewLocation

// Called every frame
void ASandboxPawn::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

	if (VelocityVector.IsZero())
	{
		const FVector NewLocation = GetActorLocation() + Velocity * DeltaTime * VelocityVector;
		SetActorLocation(NewLocation);
	}

}

Compilation success
UE_LOG showing that function works, but button that i mapped doesnt work and camera is still, i think its cause due New PlayerInput classes on UnrealEngine 5, IDE Rider shows that


i did it before exact same on UE4 was working, what can be cause of this?? :face_with_raised_eyebrow:

I do the exact same BindAxis thing in UE4 with no problem. Is it intellisense complaining? If so, you can ignore it if there are no build errors and no binding problems ingame.

there is no problem with build, tryed to find information about, there is only for EnhancedInput things, but i need to use old input method


Is there way to not getting deep into EnhancedInput things, plugin etc, disable temporary and use a old input method?

Also checked in Editor: AutoPosses, switched to Player0, AutoActivation, tryed to disable AIController, and set AutoRecieveInput on ASandboxPawn instance its doesnt affect.

Ignore it - you shouldn’t rely or trust warnings/errors/suggestions from the IDE like these.

The only ones you should care about or pay any mind to are ones from the compiler.

1 Like

Hello, just right now i found mistake that on VelocityVector if check i forgot to mark “!” operator. Ofc that is not about IDE message anymore, and buttons are binded succesfully if (!VelocityVector.IsZero()), now camera moves and scales affects on parameters, but its inverted, forward gives scale 1 but actually its move backward :face_with_raised_eyebrow: :face_with_raised_eyebrow: