Hi all
Please HELP!
X box controller face buttons Released event don’t fire but the Pressed events do fire, I tested the two shoulder buttons they fire both events Pressed & Released.
UFUNCTION()
void AButtonPressed();
UFUNCTION()
void AButtonReleased();
UFUNCTION()
void BButtonPressed();
UFUNCTION()
void BButtonReleased();
///////////
// Called to bind functionality to input
void ASaidPawnBase::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent) //class
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
// check(PlayerInputComponent);
if (PlayerInputComponent)
{
//
PlayerInputComponent->BindAction("LeftShoulderButton", IE_Pressed, this, &ASaidPawnBase::LeftShoulderPressed);
PlayerInputComponent->BindAction("LeftShoulderButton", IE_Released, this, &ASaidPawnBase::LeftShoulderReleased);
//
PlayerInputComponent->BindAction("RightShoulderButton", IE_Pressed, this, &ASaidPawnBase::RightShoulderPressed);
PlayerInputComponent->BindAction("RightShoulderButton", IE_Released, this, &ASaidPawnBase::RightShoulderReleased);
//every-frame handling for axes
PlayerInputComponent->BindAxis("LeftAnalogUpDown", this, &ASaidPawnBase::LeftAnalogUpDown);
PlayerInputComponent->BindAxis("LeftAnalogLeftRight", this, &ASaidPawnBase::LeftAnalogLeftRight);
//
PlayerInputComponent->BindAxis("RightAnalogUpDown", this, &ASaidPawnBase::RightAnalogUpDown);
PlayerInputComponent->BindAxis("RightAnalogLeftRight", this, &ASaidPawnBase::RightAnalogLeftRight);
//
PlayerInputComponent->BindAxis("LeftTrigger", this, &ASaidPawnBase::LeftTrigger);
PlayerInputComponent->BindAxis("RightTrigger", this, &ASaidPawnBase::RightTrigger);
//
PlayerInputComponent->BindAction("AButton", IE_Pressed, this, &ASaidPawnBase::AButtonPressed);
PlayerInputComponent->BindAction("AButtom", IE_Released, this, &ASaidPawnBase::AButtonReleased);
//
PlayerInputComponent->BindAction("BButton", IE_Pressed, this, &ASaidPawnBase::BButtonPressed);
PlayerInputComponent->BindAction("BButtom", IE_Released, this, &ASaidPawnBase::BButtonReleased);
//
PlayerInputComponent->BindAction("YButton", IE_Pressed, this, &ASaidPawnBase::YButtonPressed);
PlayerInputComponent->BindAction("YButtom", IE_Released, this, &ASaidPawnBase::YButtonReleased);
//
PlayerInputComponent->BindAction("XButton", IE_Pressed, this, &ASaidPawnBase::XButtonPressed);
PlayerInputComponent->BindAction("XButtom", IE_Released, this, &ASaidPawnBase::XButtonReleased);
}
}
void ASaidPawnBase::AButtonPressed(void)
{
//CurrentSpeed += 300.f;
}
void ASaidPawnBase::AButtonReleased(void)
{
if (PrintToStringPlus.IsBound())
{
PrintToStringPlus.Broadcast("AReleased : ", CurrentRotation);
}
}
void ASaidPawnBase::BButtonPressed(void)
{
if (PrintToStringPlus.IsBound())
{
PrintToStringPlus.Broadcast("BPressed : ", CurrentRotation);
}
}
void ASaidPawnBase::BButtonReleased(void)
{
//CurrentSpeed -= 300.f;
if (PrintToStringPlus.IsBound())
{
PrintToStringPlus.Broadcast("BReleased : ", CurrentRotation);
}
}
So if the shoulder buttons Released do fire but not the face buttons then my code should be right, there is probably a setting some where I’m missing. Oh and they do work in BP’s
Thanks in Advance.
GARTH