Hi all,
I am binding two Actions within my PlayerController like this…
void AMM2PlayerControllerTapeRecorder::BeginPlay()
{
Super::BeginPlay();
SetupInputComponent();
}
void AMM2PlayerControllerTapeRecorder::SetupInputComponent()
{
Super::SetupInputComponent();
check(InputComponent);
UE_LOG(LogTemp, Warning, TEXT("Setting up our control bindings"));
InputComponent->BindAction("TapeRecorderNextTrack", IE_Pressed, this, &AMM2PlayerControllerTapeRecorder::NextTrack);
InputComponent->BindAction("TapeRecorderPrevTrack", IE_Pressed, this, &AMM2PlayerControllerTapeRecorder::PrevTrack);
}
void AMM2PlayerControllerTapeRecorder::NextTrack()
{
UE_LOG(LogTemp, Warning, TEXT("Next Track Pressed"));
}
void AMM2PlayerControllerTapeRecorder::PrevTrack()
{
UE_LOG(LogTemp, Warning, TEXT("Previous Track Pressed"));
}
Everything is working fine, as in it is finding the Device and firing when I click the buttons… problem is, they are firing twice for a single button press!
LogBlueprintUserMessages: [MM2TapeRecorderUI_C_0] Next Track
LogBlueprintUserMessages: [MM2TapeRecorderUI_C_0] Next Track
LogBlueprintUserMessages: [MM2TapeRecorderUI_C_0] Prev Track
LogBlueprintUserMessages: [MM2TapeRecorderUI_C_0] Prev Track
Any ideas what could be causing this?
btw, i’ve changing the ProjectSettings->Input to different controller buttons and key presses with the same result
Many thanks,
Matt.