ACharacter::CanJump
#include "GameFramework/Character.h"
Access: public
Specifiers: constUFUNCTIONBlueprintCallable
Description
Returns true if the Character is currently allowed to jump. The default check requires the Character to be on the ground (or still within the hold window of an active jump), not crouching against a low ceiling, and that `CanEverJump()` returns true.
Caveats & Gotchas
- • CanJump() is non-virtual — to customise jump conditions override the protected `CanJumpInternal_Implementation()` or implement the BlueprintNativeEvent `CanJump` in a Blueprint subclass.
- • Multi-jump support is handled inside CanJumpInternal via JumpCurrentCount vs JumpMaxCount — increment JumpMaxCount to allow double/triple jumps; do not duplicate that logic in your own override.
Signature
ENGINE_API bool CanJump() const; Return Type
bool Examples
Gate jump action: check CanJump before calling Jump
Blueprint
Gate a jump action on CanJump C++
void AMyCharacter::TryJump()
{
if (CanJump())
{
Jump();
}
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?