Skip to content

MotionJumpComponent

The Jump Component manages multi-jump, coyote time, and jump buffering. It supports client prediction with server-authoritative validation.

Requirements

  • Character with standard UCharacterMovementComponent
  • A resolvable UAbilitySystemComponent, commonly exposed by a PlayerState that implements IAbilitySystemInterface
  • Gameplay Ability System (GAS) initialized
  • Enhanced Input System configured
  • Gameplay Effects:
    • GE_Motion_WantsToJump - Grants wants to jump tag
    • GE_Motion_Jumping - Grants jumping state tag
  • Gameplay Tags:
    • Motion.State.WantsToJump - Player input to jump
    • Motion.State.Jumping - Active jumping/falling state
    • Motion.Ability.CanJump - Required ability tag (auto-granted by component)

For setup and input binding steps, see How to add Motion to a character.

Functionality

Jump State Machine

Jump Validation Flow

Update Cycle

Expandability

The MotionJumpComponent provides extensive virtual functions for customization:

Core Jump Functions

FunctionParametersReturnsUse Case Examples
SetWantsToJump()bool bWantsToJumpvoid• Add stamina cost
• Check prerequisites
GetWantsToJump()Nonebool• Query jump intent
• UI state display
IsCurrentlyJumping()Nonebool• Check air state
• Animation triggers
CanJump()Nonebool• Add conditions
• Equipment checks
TriggerJump()bool bIsAdditionalJumpbool• Manual jump
• Ability trigger

Jump State Functions

FunctionParametersReturnsUse Case Examples
CanPerformJump()Nonebool• Validate conditions
• Check resources
PerformJump()bool bIsAdditionalJumpbool• Execute jump
• Apply modifiers
GetRemainingJumps()Noneint32• UI display
• Ability checks
HandleLanding()Nonevoid• Landing logic
• Fall damage

Timer System Functions

FunctionParametersReturnsUse Case Examples
UpdateCoyoteTime()float DeltaTimevoid• Grace period
• Platform forgiveness
UpdateJumpBuffer()float DeltaTimevoid• Input queue
• Responsive controls
IsInCoyoteTime()Nonebool• Check grace
• Allow late jump
IsJumpBuffered()Nonebool• Check buffer
• Process queue

State Management Functions

FunctionParametersReturnsUse Case Examples
UpdateJumpingState()float DeltaTimevoid• Core update
• State machine
InitializeJumpComponent()Nonevoid• Setup refs
• Cache values
OnAbilitySystemComponentReady()Nonevoid• GAS setup
• Grant abilities
GrantJumpAbilityTag()Nonevoid• Add tags
• Enable jump

Velocity Modification Functions

FunctionParametersReturnsUse Case Examples
ApplyDirectJumpVelocity()bool bIsAdditionalJumpvoid• Direct control
• Custom physics

Camera Effect Functions

FunctionParametersReturnsUse Case Examples
StartJumpCameraEffects()Nonevoid• Jump shake
• FOV change
StopJumpCameraEffects()Nonevoid• End shake
• Reset view
StartLandingCameraEffects()Nonevoid• Impact shake
• Landing feel
StopLandingCameraEffects()Nonevoid• End effects
• Smooth reset
StartCameraShake()const FMotionCurve&, int32&void• Generic shake
• Reusable effect
StopCameraShake()const FMotionCurve&, int32&void• Stop by curve
• Clean up

Input System Functions

FunctionParametersReturnsUse Case Examples
OnInputStarted()FInputActionValue&void• Jump press
• Buffer input
OnInputCompleted()FInputActionValue&void• Release
• Variable height
HandleJumpInputStateChange()bool bPressedvoid• Process input
• State change
BindJumpInput()UInputAction*bool• Bind action
• Setup input
BindJumpInputWithComponent()UInputAction*, UEnhancedInputComponent*bool• Explicit bind
• Custom comp

Utility Functions

FunctionParametersReturnsUse Case Examples
PrintDebugInformation()Nonevoid• Debug display
• State logging

Blueprint Events

EventParametersUse Case Examples
OnJumpStateChangedbool bIsJumping• Animation triggers
• State UI
OnJumpPerformedbool bIsAdditionalJump, int32 JumpNumber• Jump VFX
• Sound variation
OnLandedNone• Landing animation
• Fall damage
OnCoyoteTimeExpiredNone• Grace ended
• UI indicator
OnJumpBufferExpiredNone• Buffer cleared
• Input feedback

Network Functions

FunctionParametersReturnsUse Case Examples
ServerRequestJump()bool bWantsToJumpvoid (RPC)• Server validation
• Authority check
MulticastJumpFeedback()bool bJumped, int32 JumpNumbervoid (RPC)• Visual sync
• Other clients
MulticastLandingFeedback()Nonevoid (RPC)• Landing sync
• Effects broadcast

Configuration

Jump Settings

PropertyTypeDefaultDescriptionRange
JumpVelocityMultiplierfloat1.0Jump velocity multiplier (1.0 = default UE behavior)0.1 - 5.0
JumpVelocityModifierfloat0.0Absolute jump velocity to add-
bEnableMultiJumpboolfalseWhether to enable multi-jump functionality-
MaxAdditionalJumpsint321Maximum number of additional jumps after initial0 - 10
AdditionalJumpVelocityMultiplierfloat0.8Velocity multiplier for additional jumps0.1 - 2.0

Advanced Features

PropertyTypeDefaultDescriptionRange
CoyoteTimefloat0.15Grace period to jump after leaving ground (seconds)0.0 - 1.0
JumpBufferTimefloat0.2Allow jump input buffering when not grounded (seconds)0.0 - 1.0

Camera Effects

PropertyTypeDefaultDescription
JumpCameraShakeFMotionCurve-Camera shake curve during jumping
LandingCameraShakeFMotionCurve-Camera shake curve when landing
bApplyCameraShakebooltrueWhether to apply camera shake

Sound

PropertyTypeDefaultDescriptionRange
bAutoTriggerLandingSoundbooltrueAuto-trigger landing sounds vs Animation Notifies-

GAS Integration

PropertyTypeDescription
WantsToJumpTagEffectTSubclassOf<UGameplayEffect>Grants wants to jump tag
JumpingTagEffectTSubclassOf<UGameplayEffect>Grants jumping state tag

State Tracking (Read-Only)

PropertyTypeDescription
JumpCameraShakeIdentifierFNameUnique identifier for jump camera shake
LandingCameraShakeIdentifierFNameUnique identifier for landing camera shake
CachedMovementSoundComponentUMotionMovementSoundComponent*Reference to sound component
MotionJumpCountint32Reliable jump counter (Replicated)

Internal State Tracking (Read-Only)

PropertyTypeDescriptionRange
LastGroundedTimefloatTime when character last left ground (for coyote time)
LastJumpInputTimefloatTime when jump input was last pressed (for buffering)
OriginalJumpZVelocityfloatOriginal jump Z velocity cached at BeginPlay
bWasGroundedLastFrameboolPrevious frame's grounded state
bWasJumpingLastFrameboolPrevious frame's jumping state
bActuallyJumpedboolTrack if we performed a jump (not just falling)
bUsedCoyoteJumpboolTrack if coyote jump was used
bJumpButtonReleasedSinceLastAirJumpboolPrevents held-button multi-jump exploit
bJumpInputTriggeredThisFrameboolFrame-level input state tracking
LastJumpRPCTimefloatServer-side RPC rate limiting timestamp
bCoyoteExpiredLastFrameboolTrack coyote time expiration event
bBufferExpiredLastFrameboolTrack buffer expiration event

Debug

PropertyTypeDefaultDescription
bShowDebugInformationboolfalseDebug information display

Input binding API

The component exposes these input binding entry points:

cpp
// Blueprint binding
BindJumpInput(JumpInputAction);

// C++ with explicit component
BindJumpInputWithComponent(JumpAction, EnhancedInputComponent);

// Manual jump trigger (bypasses input)
TriggerJump(bIsAdditionalJump);

Jump State Access

Query jump state for gameplay logic:

  • GetWantsToJump() - Check if player wants to jump (input pressed)
  • IsCurrentlyJumping() - Check if character is jumping or falling
  • GetRemainingJumps() - Get remaining jumps available
  • IsInCoyoteTime() - Check if within coyote time window
  • IsJumpBuffered() - Check if jump input is buffered
  • CanJump() - Check if character can perform another jump

Coyote Time & Jump Buffering

Coyote Time Visualization

Coyote Time: Grace period after leaving a platform where jumping is still allowed

  • Prevents frustration from barely missing platform edges
  • Only applies to first jump (not multi-jumps)
  • Tracked via LastGroundedTime and bUsedCoyoteJump

Jump Buffering: Input queuing system for responsive controls

  • Stores jump input when pressed before landing
  • Automatically executes when landing occurs
  • Makes precise platforming more forgiving

Multi-Jump System

Motion implements a custom counter, because the built-in one tends to count incorrectly due to a bug of Unreal Engine.

Multi-Jump Flow

When enabled, allows additional jumps while airborne:

  • Jump Count tracked via MotionJumpCount (reliable counter)
  • Server Validation via server-side CanPerformJump() validation
  • Velocity Reduction per additional jump for balance
  • Dynamic Upgrades by modifying MaxAdditionalJumps at runtime

Networking

The component handles multiplayer through:

  • Server RPCs - ServerRequestJump() for validation
  • Multicast Events - Visual feedback to all clients
  • Server Validation - Jump conditions checked on authority
  • Client Prediction - Immediate local response
  • State Reconciliation - Authority-based validation

Motion - Advanced First Person Character Controller