ACharacter::JumpKeyHoldTime
#include "GameFramework/Character.h"
Access: public
Specifiers: UPROPERTYTransientBlueprintReadOnlyVisibleInstanceOnly
Description
Tracks the total time in seconds that the jump key has been continuously held. Used by the engine to determine how much additional vertical force to apply when `JumpMaxHoldTime` is non-zero.
Caveats & Gotchas
- • This is a `Transient` runtime value, not a design-time setting. Do not try to set it directly to control jump behavior — modify `JumpMaxHoldTime` instead. Writing to this property will be overwritten on the next `CheckJumpInput` call.
- • The value only increments while `bPressedJump` is true and the character is in the `Falling` movement mode providing jump force. It resets to 0 when `StopJumping()` is called or when `JumpKeyHoldTime >= JumpMaxHoldTime`.
- • Reading this value on a simulated proxy is unreliable — it is not replicated. Use `bProxyIsJumpForceApplied` or the `JumpForceTimeRemaining` property for simulated proxy jump state.
Signature
UPROPERTY(Transient, BlueprintReadOnly, VisibleInstanceOnly, Category=Character)
float JumpKeyHoldTime Example
Display jump hold progress in a debug HUD C++
void AMyHUD::DrawJumpDebug(ACharacter* Character)
{
if (Character && Character->JumpMaxHoldTime > 0.f)
{
float Progress = Character->JumpKeyHoldTime / Character->JumpMaxHoldTime;
DrawRect(FLinearColor::Green, 50, 50, 200 * Progress, 20);
}
} Version History
Introduced in: 4.8
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?