RealDocs

ACharacter::IsJumpProvidingForce

function Engine Blueprint Since 4.8
#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
Event Tick Delta Seconds Delta Seconds Is Jump Providing Force Target is Character Target Return Value Return Value Get Character Movement Target is Character Target Return Value Branch Condition Condition True False Set Gravity Scale Target is Character Movement Target Gravity Scale 0.5 0.5 Get Character Movement Target is Character Target Return Value Set Gravity Scale Target is Character Movement Target Gravity Scale 1.0 1.0
Edit Blueprint graph On Tick, lower gravity while jump force is active, restore it when done
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
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;
    }
}

Version History

Introduced in: 4.8

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.