ACharacter::CheckJumpInput
#include "GameFramework/Character.h"
Access: public
Specifiers: virtualENGINE_API
Description
Called each frame by CharacterMovementComponent to process jump input. Consumes bPressedJump, increments JumpCurrentCount, and calls OnJumped() when a new jump is initiated.
Caveats & Gotchas
- • This function increments JumpCurrentCount and sets JumpCurrentCountPreJump. Overrides that do not call Super::CheckJumpInput() must manage these variables manually, or multi-jump and network prediction logic will silently break.
- • CheckJumpInput is called from the movement component, not from the character's own Tick. Do not call it directly — set bPressedJump to true and let the movement component invoke it on the correct tick.
Signature
ENGINE_API virtual void CheckJumpInput(float DeltaTime); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DeltaTime | float | Delta time in seconds since the last frame. | — |
Return Type
void Example
Add a stamina gate to jumping by overriding CheckJumpInput C++
void AMyCharacter::CheckJumpInput(float DeltaTime)
{
if (bPressedJump && Stamina < JumpStaminaCost)
{
// Not enough stamina — cancel the jump request
bPressedJump = false;
}
Super::CheckJumpInput(DeltaTime);
} Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?