KompaktKat
(KompaktKat)
September 8, 2016, 8:32pm
1
I have my character programmed to jump in his C++ code. It works, but he can jump again even before the character is finished his previous jump.
InputComponent->BindAction("JumpUp", IE_Pressed, this, &APrankster::OnStartJump);
InputComponent->BindAction("JumpUp", IE_Released, this, &APrankster::OnStopJump);
void APrankster::OnStartJump()
{
bPressedJump = true;
}
void APrankster::OnStopJump()
{
bPressedJump = false;
}
Hey pikachu1001000,
Can you try the following?
InputComponent->BindAction( "Jump", IE_Pressed, this, &ACharacter::Jump );
InputComponent->BindAction( "Jump", IE_Released, this, &ACharacter::StopJumping );
Because ACharacter already has the functions needed, you can simply use that.
Also, make sure that “MaxJumpCount” is set to 1.
KompaktKat
(KompaktKat)
September 8, 2016, 8:59pm
3
That worked! Thank you very much. Just a side note: This started happening in 4.13 and didn’t happen in 4.12. None of my jumping code was changed since then.