ACharacter::StopJumping
#include "GameFramework/Character.h"
Access: public
Specifiers: virtualUFUNCTIONBlueprintCallable
Description
Clears the jump input flag (`bPressedJump`) and resets the hold timer so the Character stops receiving jump Z-velocity on the next movement update. Bind this to a button-release event when using hold-to-jump.
Caveats & Gotchas
- • If JumpMaxHoldTime is zero (the default), the jump velocity is applied as a single impulse and StopJumping() has no ongoing effect — you only need it when using hold-to-jump mechanics.
- • StopJumping does not immediately remove upward velocity; it stops future upward force from being added. Gravity will naturally reduce the velocity over subsequent ticks.
Signature
ENGINE_API virtual void StopJumping(); Return Type
void Examples
Cancel jump hold on input release
Blueprint
Bind StopJumping to button release C++
void AMyCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
PlayerInputComponent->BindAction("Jump", IE_Pressed, this, &ACharacter::Jump);
PlayerInputComponent->BindAction("Jump", IE_Released, this, &ACharacter::StopJumping);
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?