Navigation
API > API/Plugins > API/Plugins/NetworkPredictionExtras
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- UNetworkPredictionComponent
- UBaseMovementComponent
- UMockRootMotionComponent
References
| Module | NetworkPredictionExtras |
| Header | /Engine/Plugins/Runtime/NetworkPredictionExtras/Source/NetworkPredictionExtras/Public/MockRootMotionComponent.h |
| Include | #include "MockRootMotionComponent.h" |
Syntax
UCLASS&40;BlueprintType, Meta&61;&40;BlueprintSpawnableComponent&41;&41;
class UMockRootMotionComponent :
public UBaseMovementComponent,
public IRootMotionSourceStore
Remarks
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)
Variables
| Type | Name | Description | |
|---|---|---|---|
| UAnimInstance * | AnimInstance | ||
| TUniquePtr< FMockRootMotionSimulation > | OwnedMockRootMotionSimulation | ||
| FMockRootMotionInputCmd | PendingInputCmd | Next local InputCmd that will be submitted. This is a simple way of getting input to the system. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| UMockRootMotionSource * | CreateRootMotionSource
(
TSubclassOf< UMockRootMotionSource > Source |
||
| void | FinalizeFrame
(
const FMockRootMotionSyncState* SyncState, |
||
| void | |||
| void | InitializeSimulationState
(
FMockRootMotionSyncState* SyncState, |
||
| void | Input_PlayRootMotionSource
(
UMockRootMotionSource* Source |
||
| void | |||
| void | PlayRootMotionSource
(
UMockRootMotionSource* Source |
Callable by authority. | |
| void | PlayRootMotionSourceByClass
(
TSubclassOf< UMockRootMotionSource > Source |
||
| void | ProduceInput
(
const int32 SimTimeMS, |
||
| void | RestoreFrame
(
const FMockRootMotionSyncState* SyncState, |
Overridden from UBaseMovementComponent
| Type | Name | Description | |
|---|---|---|---|
| void | SetUpdatedComponent
(
USceneComponent* NewUpdatedComponent |
Basic "Update Component/Ticking". |
Overridden from UNetworkPredictionComponent
| Type | Name | Description | |
|---|---|---|---|
| void | Classes must initialize the NetworkPredictionProxy (register with the NetworkPredictionSystem) here. EndPlay will unregister. |
Overridden from IRootMotionSourceStore
| Type | Name | Description | |
|---|---|---|---|
| UMockRootMotionSource * | ResolveRootMotionSource
(
int32 ID, |
Root Motion Object store. | |
| void | StoreRootMotionSource
(
int32 ID, |