Hello!
I’m using UE4 with C++, so the question is - how to keep character jumping while key is pressed? Is there some usefulf variable for that, or i should use something like onlanded event and check if key still pressed for another jump?
Details: i’m using player controller for taking inputs and bind them, then call method “Jump” for possessed character.
Tried to set character->bPressedJump = true; and character->JumpKeyHoldTime = 0.f; with no luck. Googled a few hours, nothing
Example:
InputComponent->BindAction("Jump", IE_Pressed, this, &AXPlayerController::JumpStart);
InputComponent->BindAction("Jump", IE_Released, this, &AXPlayerController::JumpStop);
void AXPlayerController::JumpStart() {
if (character) {
character->Jump();
}
}