UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FRootMotionSource_JumpForce Struct Reference

#include <RootMotionSource.h>

+ Inheritance diagram for FRootMotionSource_JumpForce:

Public Member Functions

ENGINE_API FRootMotionSource_JumpForce ()
 
virtual ~FRootMotionSource_JumpForce ()
 
ENGINE_API FVector GetPathOffset (float MoveFraction) const
 
ENGINE_API FVector GetRelativeLocation (float MoveFraction) const
 
virtual ENGINE_API bool IsTimeOutEnabled () const override
 
virtual ENGINE_API FRootMotionSourceClone () const override
 
virtual ENGINE_API bool Matches (const FRootMotionSource *Other) const override
 
virtual ENGINE_API bool MatchesAndHasSameState (const FRootMotionSource *Other) const override
 
virtual ENGINE_API bool UpdateStateFrom (const FRootMotionSource *SourceToTakeStateFrom, bool bMarkForSimulatedCatchup=false) override
 
virtual ENGINE_API void PrepareRootMotion (float SimulationTime, float MovementTickTime, const ACharacter &Character, const UCharacterMovementComponent &MoveComponent) override
 
virtual ENGINE_API bool NetSerialize (FArchive &Ar, UPackageMap *Map, bool &bOutSuccess) override
 
virtual ENGINE_API UScriptStructGetScriptStruct () const override
 
virtual ENGINE_API FString ToSimpleString () const override
 
virtual ENGINE_API void AddReferencedObjects (class FReferenceCollector &Collector) override
 
- Public Member Functions inherited from FRootMotionSource
ENGINE_API FRootMotionSource ()
 
virtual ~FRootMotionSource ()
 
ENGINE_API float GetTime () const
 
ENGINE_API float GetStartTime () const
 
ENGINE_API bool IsStartTimeValid () const
 
ENGINE_API float GetDuration () const
 
virtual ENGINE_API bool IsActive () const
 
virtual ENGINE_API void SetTime (float NewTime)
 
virtual ENGINE_API void CheckTimeOut ()
 

Public Attributes

FRotator Rotation
 
float Distance
 
float Height
 
bool bDisableTimeout
 
TObjectPtr< UCurveVectorPathOffsetCurve
 
TObjectPtr< UCurveFloatTimeMappingCurve
 
FVector SavedHalfwayLocation
 
- Public Attributes inherited from FRootMotionSource
uint16 Priority
 
uint16 LocalID
 
FName InstanceName
 
float StartTime
 
float CurrentTime
 
float PreviousTime
 
float Duration
 
FRootMotionSourceStatus Status
 
FRootMotionSourceSettings Settings
 
ERootMotionAccumulateMode AccumulateMode
 
bool bInLocalSpace
 
bool bNeedsSimulatedCatchup
 
bool bSimulatedNeedsSmoothing
 
FRootMotionMovementParams RootMotionParams
 
FRootMotionFinishVelocitySettings FinishVelocityParams
 

Detailed Description

JumpForce moves the target in a jump-like manner (ends when landing, applied force is relative)

Constructor & Destructor Documentation

◆ FRootMotionSource_JumpForce()

FRootMotionSource_JumpForce::FRootMotionSource_JumpForce ( )

◆ ~FRootMotionSource_JumpForce()

virtual FRootMotionSource_JumpForce::~FRootMotionSource_JumpForce ( )
inlinevirtual

Member Function Documentation

◆ AddReferencedObjects()

void FRootMotionSource_JumpForce::AddReferencedObjects ( class FReferenceCollector Collector)
overridevirtual

Reimplemented from FRootMotionSource.

◆ Clone()

FRootMotionSource * FRootMotionSource_JumpForce::Clone ( ) const
overridevirtual
Returns
newly allocated copy of this FRootMotionSource. Must be overridden by child classes.

Reimplemented from FRootMotionSource.

◆ GetPathOffset()

FVector FRootMotionSource_JumpForce::GetPathOffset ( float  MoveFraction) const

◆ GetRelativeLocation()

FVector FRootMotionSource_JumpForce::GetRelativeLocation ( float  MoveFraction) const

◆ GetScriptStruct()

UScriptStruct * FRootMotionSource_JumpForce::GetScriptStruct ( ) const
overridevirtual

Reimplemented from FRootMotionSource.

◆ IsTimeOutEnabled()

bool FRootMotionSource_JumpForce::IsTimeOutEnabled ( ) const
overridevirtual
Returns
whether this source will be removed when CurrentTime reaches Duration

Reimplemented from FRootMotionSource.

◆ Matches()

bool FRootMotionSource_JumpForce::Matches ( const FRootMotionSource Other) const
overridevirtual
Returns
Whether this is the same RootMotionSource as Other. This is used for networking when clients receive RootMotionSource data from the server and need to decide which local RootMotionSource to compare and apply the corrections to. This is required due to RootMotionSources in general being added independently on server and clients, not needing to know about each other by default.

For well-networked RootMotionSources, any given FRootMotionSource child class could implement their own unique ID and simply use that in the Matches check. This "heuristic-style" default was chosen to simplify addition of new RootMotionSources, and assumes that in a networked setting a given RootMotionSource won't be applied many times in a given frame by the same instigator to the same target with the exact same parameters.

Guaranteed uniqueness would also require a strict application order ("RootMotionSources can only be added on Authority") or a prediction-based setup ("Apply on Autonomous and Simulated predictively, then apply on Authority and confirm, and if Authority doesn't confirm remove them"). We avoid that synchronization complexity for now.

See UCharacterMovementComponent::ConvertRootMotionServerIDsToLocalIDs

Should be overridden by child classes, as default implementation only contains basic equivalency checks

Reimplemented from FRootMotionSource.

◆ MatchesAndHasSameState()

bool FRootMotionSource_JumpForce::MatchesAndHasSameState ( const FRootMotionSource Other) const
overridevirtual

Checks that it Matches() and has the same state (time, track position, etc.)

Reimplemented from FRootMotionSource.

◆ NetSerialize()

bool FRootMotionSource_JumpForce::NetSerialize ( FArchive Ar,
UPackageMap Map,
bool bOutSuccess 
)
overridevirtual

Reimplemented from FRootMotionSource.

◆ PrepareRootMotion()

void FRootMotionSource_JumpForce::PrepareRootMotion ( float  SimulationTime,
float  MovementTickTime,
const ACharacter Character,
const UCharacterMovementComponent MoveComponent 
)
overridevirtual

Generates the RootMotion for this Source, can be used for both "live" generation or for playback (client prediction correction, simulated proxies, etc.)

Examples:

  • Animation RootMotionSources use Time as track time into AnimMontage and extract the root motion from AnimMontage chunk of time (Position,Position+DeltaTime)
  • ConstantForce source uses Time as the time into the application so if its duration ends halfway through the frame it knows how much root motion it should have applied
  • Spline/curve-based sources use Time for knowing where on spline/curve to extract from
    Parameters
    SimulationTimeHow far forward in time to simulate root motion
    MovementTickTimeHow much time the movement is going to take that this is being prepared for

Reimplemented from FRootMotionSource.

◆ ToSimpleString()

FString FRootMotionSource_JumpForce::ToSimpleString ( ) const
overridevirtual

Reimplemented from FRootMotionSource.

◆ UpdateStateFrom()

bool FRootMotionSource_JumpForce::UpdateStateFrom ( const FRootMotionSource SourceToTakeStateFrom,
bool  bMarkForSimulatedCatchup = false 
)
overridevirtual

Mainly for server correction purposes - update this Source's state from another's, usually the authoritative state from the server's version of the Source

Parameters
bMarkForSimulatedCatchupsets the source for needing to "catch up" to current state next Prepare
Returns
Whether the update was sucessful or not. Note that failure to update denotes a complete failure, and the Source will then be marked for removal. We need to remove since we don't have a way of reverting partial updates depending on where the update failed.

Reimplemented from FRootMotionSource.

Member Data Documentation

◆ bDisableTimeout

bool FRootMotionSource_JumpForce::bDisableTimeout

◆ Distance

float FRootMotionSource_JumpForce::Distance

◆ Height

float FRootMotionSource_JumpForce::Height

◆ PathOffsetCurve

TObjectPtr<UCurveVector> FRootMotionSource_JumpForce::PathOffsetCurve

◆ Rotation

FRotator FRootMotionSource_JumpForce::Rotation

◆ SavedHalfwayLocation

FVector FRootMotionSource_JumpForce::SavedHalfwayLocation

◆ TimeMappingCurve

TObjectPtr<UCurveFloat> FRootMotionSource_JumpForce::TimeMappingCurve

The documentation for this struct was generated from the following files: