ACharacter::IsJumpProvidingForce
#include "GameFramework/Character.h"
Access: public
Specifiers: virtualENGINE_APIUFUNCTIONBlueprintCallable
Description
Returns true while the jump key is held and the hold time has not yet exceeded JumpMaxHoldTime, meaning the jump is still actively applying upward force. When JumpMaxHoldTime is zero, this always returns false after the initial impulse.
Caveats & Gotchas
- • On simulated proxies (non-owning clients), this is determined by the replicated bProxyIsJumpForceApplied flag rather than local timing, so the result can lag by one network update.
- • The return value becomes false the moment JumpKeyHoldTime exceeds JumpMaxHoldTime, even if the character is still moving upward. Do not use this to check whether the character is airborne — use GetCharacterMovement()->IsFalling() for that.
Signature
ENGINE_API virtual bool IsJumpProvidingForce() const; Return Type
bool Examples
On Tick, lower gravity while jump force is active, restore it when done
Blueprint
Conditionally apply extra upward boost while jump is active C++
void AMyCharacter::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
if (IsJumpProvidingForce())
{
// Add a glide effect while jump force is active
GetCharacterMovement()->GravityScale = 0.5f;
}
else
{
GetCharacterMovement()->GravityScale = 1.0f;
}
} Tags
Version History
Introduced in: 4.8
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?