ACharacter::ResetJumpState
#include "GameFramework/Character.h"
Access: public
Specifiers: virtualENGINE_API
Description
Marks the character as no longer attempting to jump, clearing jump-related state flags and timers. Called automatically when the character lands or when jump input is explicitly stopped.
Caveats & Gotchas
- • This does not immediately stop upward velocity — it only clears the intent flags. The character will continue traveling upward from existing velocity until gravity takes effect.
- • If you override this, call Super::ResetJumpState() to ensure JumpKeyHoldTime and JumpForceTimeRemaining are properly zeroed out, otherwise multi-jump logic based on those values will break.
Signature
ENGINE_API virtual void ResetJumpState(); Return Type
void Example
Force-cancel a jump mid-air C++
// Cancel jump state when the character takes damage mid-air
void AMyCharacter::TakeDamage_Implementation(float Damage)
{
Super::TakeDamage(Damage);
if (GetCharacterMovement()->IsFalling())
{
ResetJumpState();
}
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?