Skip to content

MotionJumpComponent

MotionJumpComponent manages jump intent, multi-jump, coyote time, jump-input timing, landing feedback, and server validation.

Requirements

  • The character must have a standard UCharacterMovementComponent.
  • Motion must find a UAbilitySystemComponent. A PlayerState that implements IAbilitySystemInterface can expose this component.
  • You must initialize the Gameplay Ability System.
  • You must configure Enhanced Input.
  • You must configure wants-to-jump and jumping GameplayEffects.
  • You must configure GameplayTags for jump intent and active jumping.

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

Behavior

The component stores jump input and does a check to find whether a jump can execute. It gets CharacterMovementComponent->JumpZVelocity from the assigned profile and calls native ACharacter::Jump(). It also controls coyote time, resets jump count after landing, and sends camera, sound, and Blueprint feedback.

Coyote time permits a jump shortly after the character leaves the ground. JumpBufferTime defines only the time window that IsJumpBuffered() and the debug display report. The wants-to-jump tag controls jump execution. Jump execution does not do a test of the JumpBufferTime window.

API

Input and state

  • SetWantsToJump(bool bWantsToJump) -> void: sets jump intent.
  • HandleJumpInputStateChange(bool bPressed) -> void: processes jump input push and release.
  • GetWantsToJump() -> bool: returns jump intent.
  • IsCurrentlyJumping() -> bool: Returns whether Motion.State.Jumping is present. Authority applies that tag only during a fall after a jump. It does not apply the tag after the character walks off a ledge.
  • CanJump() -> bool: returns whether another jump can execute.
  • TriggerJump(bool bIsAdditionalJump) -> bool: Starts a jump directly. It uses bIsAdditionalJump to select the velocity multiplier. On authority, this direct path does not call CanJump() first.
  • GetRemainingJumps() -> int32: Returns the remaining jumps in the current sequence. This count includes the initial grounded jump. With multi-jump disabled, it returns 1 on the ground and 0 in the air.
  • IsInCoyoteTime() -> bool: returns whether coyote time is active.
  • IsJumpBuffered() -> bool: reports whether the current time is within JumpBufferTime of LastJumpInputTime.

Profile

  • GetProfile() -> UMotionJumpProfile*: returns the assigned jump profile.
  • SetProfile(UMotionJumpProfile* NewProfile) -> void: assigns a setup-time profile before BeginPlay.
  • HasValidProfile() -> bool: returns whether the assigned profile validates.

Configuration

Configuration is in the assigned MotionJumpProfile. The default Motion profile for this release is /MotionCore/Motion/Profiles/v2_0_0/DA_MotionJumpProfile_Default_v2_0_0.

Jump settings

  • JumpVelocityMultiplier: jump velocity multiplier. Default: 1.0.
  • JumpVelocityModifier: absolute jump velocity added. Default: 0.0.
  • MaxAdditionalJumps: number of additional airborne jumps. 0 disables multi-jump. Default: 0.
  • AdditionalJumpVelocityMultiplier: velocity multiplier for additional jumps. Default: 0.8.

Responsiveness settings

  • CoyoteTime: grace period after leaving ground. Default: 0.15.
  • JumpBufferTime: time window reported by IsJumpBuffered() after the last recorded jump input. Default: 0.2.

Effects and feedback

  • JumpCameraShake: camera curve during jump.
  • LandingCameraShake: camera curve when landing.
  • bApplyCameraShake: Specifies whether Motion applies camera shake.
  • bAutoTriggerLandingSound: Enables automatic landing sounds.
  • WantsToJumpTagEffect: grants wants-to-jump tag.
  • JumpingTagEffect: grants jumping state tag.

The primary setting that you edit is the Profile reference. Input and coyote timestamps, jump counts, camera curve playback, and replicated state stay on the component.

Runtime State

These fields are protected component state. Derived Blueprints have read-only access to CachedMovementSoundComponent and MotionJumpCount.

  • CachedMovementSoundComponent: Stores the cached sound component reference.
  • MotionJumpCount: Stores the replicated jump counter.
  • LastGroundedTime: Stores the time when the character last left the ground.
  • LastJumpInputTime: Stores the time when SetWantsToJump(true) adds the wants-to-jump tag.
  • OriginalJumpZVelocity: Stores the jump Z velocity from BeginPlay.
  • bWasGroundedLastFrame: Stores the previous grounded state.
  • bWasJumpingLastFrame: Stores the previous jumping state.
  • bActuallyJumped: Shows whether the component completed a jump.
  • bUsedCoyoteJump: Shows whether the character used a coyote jump.
  • bJumpButtonReleasedSinceLastAirJump: Prevents held-button multi-jump.
  • bJumpInputTriggeredThisFrame: Stores the frame-level input flag.
  • LastJumpRPCTime: Stores the server-side RPC rate-limit time.

Blueprint Events

  • OnJumpStateChangedDelegate(bool bIsJumping): Broadcasts on authority when the actual-jump fall state of the component changes.
  • OnJumpPerformedDelegate(bool bIsAdditionalJump, int32 JumpNumber): Fires when a jump starts.
  • OnLandedDelegate(): Fires when the character lands.

Networking

The owning client predicts the wants-to-jump loose tag and native jump. ServerRequestJump rate-limits and validates remote requests before the authoritative jump. MotionJumpCount replicates. Unreliable multicasts send jump and landing feedback to non-owning instances.

Motion - Advanced First Person Character Controller