Navigation
API > API/Plugins > API/Plugins/NetworkPredictionExtras
This component acts as the Driver for the FMockRootMotionSimulation It is essentially a standin for the movement component, and would be replaced by "new movement system" component. If we support "root motion without movement component" then this could either be that component, or possibly built into or inherit from a USkeletalMeshComponent.
The main thing this provides is: -Interface for initiating root motions through the NP system (via client Input and via server "OOB" writes) -FinalizeFrame: take the output of the NP simulation and push it to the movement/animation components -Place holder implementation of IRootMotionSourceStore(the temp thing that maps our RootMotionSourceIDs -> actual sources)
| Name | UMockRootMotionComponent |
| Type | class |
| Header File | /Engine/Plugins/Runtime/NetworkPredictionExtras/Source/NetworkPredictionExtras/Public/MockRootMotionComponent.h |
| Include Path | #include "MockRootMotionComponent.h" |
Syntax
UCLASS (BlueprintType, Meta=(BlueprintSpawnableComponent))
class UMockRootMotionComponent :
public UBaseMovementComponent ,
public IRootMotionSourceStore
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → UNetworkPredictionComponent → UBaseMovementComponent → UMockRootMotionComponent
Implements Interfaces
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| RootMotionSourceCache | FRootMotionSourceCache | MockRootMotionComponent.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UMockRootMotionSource * CreateRootMotionSource
(
TSubclassOf< UMockRootMotionSource > Source |
MockRootMotionComponent.h |
|
|
void FinalizeFrame
(
const FMockRootMotionSyncState* SyncState, |
MockRootMotionComponent.h | ||
void InitializeSimulationState
(
FMockRootMotionSyncState* SyncState, |
MockRootMotionComponent.h | ||
void Input_PlayRootMotionSource
(
UMockRootMotionSource* Source |
MockRootMotionComponent.h |
|
|
void Input_PlayRootMotionSourceByClass
(
TSubclassOf< UMockRootMotionSource > Source |
MockRootMotionComponent.h |
|
|
void PlayRootMotionSource
(
UMockRootMotionSource* Source |
Callable by authority. | MockRootMotionComponent.h |
|
void PlayRootMotionSourceByClass
(
TSubclassOf< UMockRootMotionSource > Source |
MockRootMotionComponent.h |
|
|
void ProduceInput
(
const int32 SimTimeMS, |
MockRootMotionComponent.h | ||
void RestoreFrame
(
const FMockRootMotionSyncState* SyncState, |
MockRootMotionComponent.h |
Overridden from UBaseMovementComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void SetUpdatedComponent
(
USceneComponent* NewUpdatedComponent |
Basic "Update Component/Ticking". | MockRootMotionComponent.h |
Overridden from IRootMotionSourceStore
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UMockRootMotionSource * ResolveRootMotionSource
(
int32 ID, |
Root Motion Object store. | MockRootMotionComponent.h | |
virtual void StoreRootMotionSource
(
int32 ID, |
MockRootMotionComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void FindAndCacheAnimInstance() |
MockRootMotionComponent.h |
Overridden from UNetworkPredictionComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void InitializeNetworkPredictionProxy() |
MockRootMotionComponent.h |