Im having an issue with my section for binding inputs in Unreal Engine 5.2
This is the code:
void AMyFpsController::SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent)
{
// Set up action bindings
if (UEnhancedInputComponent* EnhancedInputComponent = CastChecked<UEnhancedInputComponent>(PlayerInputComponent))
{
//Jumping
EnhancedInputComponent->BindAction(Forward, ETriggerEvent::Triggered, this, &AMyFpsController::MoveForward);
}
}
This the error I’m getting.
C:\Users\louis\proj\unreal\learningUnreal\Source\learningUnreal\MyFpsController.cpp(35): error C2664: 'FEnhancedInputActionEventBinding &UEnhancedInputComponent::BindAction(const UInputAction *,ETriggerEvent,UObject *,FName)': cannot convert argument 1 from 'overloaded-function' to 'const UInputAction *'
C:\Users\louis\proj\unreal\learningUnreal\Source\learningUnreal\MyFpsController.cpp(35): note: Context does not allow for disambiguation of overloaded function
C:\Users\louis\ue_installs\UE_5.2\Engine\Plugins\EnhancedInput\Source\EnhancedInput\Public\EnhancedInputComponent.h(436): note: see declaration of 'UEnhancedInputComponent::BindAction'