UCharacterMotionComponent

ActorComponent for running CharacterMotion

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

NetworkPredictionExtras

Header

/Engine/Plugins/Runtime/NetworkPredictionExtras/Source/NetworkPredictionExtras/Public/CharacterMotionComponent.h

Include

#include "CharacterMotionComponent.h"

Syntax

UCLASS(BlueprintType, Meta=(BlueprintSpawnableComponent))
class UCharacterMotionComponent : public UBaseMovementComponent

Remarks

ActorComponent for running CharacterMotion

Variables

Constructors

Name Description

Public function

UCharacterMotionComponent()

Functions

Name Description

Public function

void

 

AddMaxMoveSpeed

(
    float AdditiveMaxMoveSpeed
)

Public function

void

 

FinalizeFrame

(
    const FCharacterMotionSyncState...,
    const FCharacterMotionAuxState*...
)

Take output for simulation.

Protected function Static

float

 

GetDefaultMaxSpeed()

Public function Const

float

 

GetMaxMoveSpeed()

Protected function

void

 

InitCharacterMotionSimulation

(
    FCharacterMotionSimulation* Si...
)

Public function

void

 

InitializeSimulationState

(
    FCharacterMotionSyncState* Syn...,
    FCharacterMotionAuxState* Aux
)

Seed initial values based on component's state.

Public function

void

 

ProduceInput

(
    const int32 DeltaTimeMS,
    FCharacterMotionInputCmd* Cmd
)

Get latest local input prior to simulation step.

Public function

void

 

RestoreFrame

(
    const FCharacterMotionSyncState...,
    const FCharacterMotionAuxState*...
)

Restore a previous frame prior to resimulating.

Public function

void

 

SetMaxMoveSpeed

(
    float NewMaxMoveSpeed
)

Overridden from UBaseMovementComponent

Name Description

Public function Virtual

void

 

OnBeginOverlap

(
    UPrimitiveComponent* Overlappe...,
    AActor* Other,
    UPrimitiveComponent* OtherComp,
    int32 OtherBodyIndex,
    bool bFromSweep,
    const FHitResult& SweepResult
)

BeginOverlap has to be bound to a ufunction, so we have no choice but to bind here and forward into simulation code. Not ideal.

Overridden from UNetworkPredictionComponent

Name Description

Protected function Virtual

void

 

InitializeNetworkPredictionProxy()

Network Prediction.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.

Typedefs

Name

Description

FProduceCharacterInput

Forward input producing event to someone else (probably the owning actor)