Skip to content

MotionJumpComponent

Manages jump mechanics including multi-jump, coyote time, jump buffering, and camera effects during jumping and landing. Features server-authoritative jump validation with client prediction and comprehensive visual/audio feedback.

Requirements

  • Character with standard UCharacterMovementComponent
  • MotionPlayerState configured in GameMode
  • 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

Installation

  1. Add UMotionJumpComponent to your Character Blueprint or C++ class
  2. Configure the component properties in the Details panel
  3. Set the JumpingTagEffect to GE_Motion_Jumping
  4. Set the WantsToJumpTagEffect to GE_Motion_WantsToJump
  5. Configure jump parameters:
    • Set JumpVelocityMultiplier for jump height
    • Configure MaxAdditionalJumps for multi-jump
    • Set CoyoteTime and JumpBufferTime for forgiving controls
  6. Bind jump input action in Enhanced Input or through component

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
ResetJumpCount()Nonevoid• Landing reset
• Ability refresh
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
InitializeComponent()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()FStructMotionCurve&, int32&void• Generic shake
• Reusable effect
StopCameraShake()FString&, int32&void• Stop by ID
• 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
JumpCameraShakeFStructMotionCurve-Camera shake curve during jumping
LandingCameraShakeFStructMotionCurve-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)

PropertyTypeDescriptionRange
JumpCameraShakeIdentifierFStringUnique identifier for jump camera shake
LandingCameraShakeIdentifierFStringUnique identifier for landing camera shake
CachedMovementSoundComponentUMotionMovementSoundComponent*Reference to sound component
MotionJumpCountint32Reliable jump counter

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
bWasJumpingLastFramebool Previous frame's jumping state
bActuallyJumpedboolTrack if we performed a jump (not just falling)
bUsedCoyoteJumpboolTrack if coyote jump was used
bCoyoteExpiredLastFrameboolTrack coyote time expiration event
bBufferExpiredLastFrameboolTrack buffer expiration event

Debug

PropertyTypeDefaultDescription
bShowDebugInformationboolfalseDebug information display

Input Binding

The component provides multiple ways to bind jump input:

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