None of the 4 overloads could convert all the argument types

Hi

I am trying to convert the Crypt Rider project to use enhanced input components in Unreal 5.1 but I get this error:

CryptRaiderCharacter.cpp(91): [C2665] ‘UEnhancedInputComponent::BindAction’: none of the 4 overloads could convert all the argument types

The line of the error:

void ACryptRaiderCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
  ...
  if (UEnhancedInputComponent* EnhancedInputComponent = CastChecked<UEnhancedInputComponent>(PlayerInputComponent))
	{
		EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &ACryptRaiderCharacter::Move);	// error here	
	}

}

void ACryptRaiderCharacter::Move(FInputActionValue& Value)
{
    const float DirectionValue = Value.Get<float>();
    if (Controller && DirectionValue != 0.f)
    {
        FVector Forward = GetActorForwardVector();
        AddMovementInput(Forward, DirectionValue);      
    }
}

Declaration of input action:

UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Input)
UInputAction* MoveAction;

What is the problem ?

I tried deleted saved, binaries, Intermediate and compile but I get same error

found solution Move function need to be like this

void ACryptRaiderCharacter::Move(const FInputActionValue &Value)

Hey there! Quick question, since you did it already. How did you implement the Grabber with the new Enhanced Input System? Did you leave it as a SceneComponent?

sorry I dont remember but here are youtube tutorials

Try writing struct FInputActionValue at the top of header file class

Privacy & Terms