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

#include <ReplicatedState.h>

Public Member Functions

ENGINE_API FRepMovement ()
 
ENGINE_API bool SerializeQuantizedVector (FArchive &Ar, FVector &Vector, EVectorQuantization QuantizationLevel)
 
ENGINE_API bool NetSerialize (FArchive &Ar, class UPackageMap *Map, bool &bOutSuccess)
 
void FillFrom (const FRigidBodyState &RBState, const AActor *const Actor=nullptr, int32 InServerFrame=0)
 
void CopyTo (FRigidBodyState &RBState, const AActor *const Actor=nullptr) const
 
bool operator== (const FRepMovement &Other) const
 
bool operator!= (const FRepMovement &Other) const
 

Static Public Member Functions

static ENGINE_API FVector RebaseOntoLocalOrigin (const FVector &Location, const FIntVector &LocalOrigin)
 
static ENGINE_API FVector RebaseOntoZeroOrigin (const FVector &Location, const FIntVector &LocalOrigin)
 
static ENGINE_API FVector RebaseOntoLocalOrigin (const FVector &Location, const AActor *const WorldContextActor)
 
static ENGINE_API FVector RebaseOntoZeroOrigin (const FVector &Location, const AActor *const WorldContextActor)
 
static ENGINE_API FVector RebaseOntoLocalOrigin (const FVector &Location, const class UActorComponent *const WorldContextActorComponent)
 
static ENGINE_API FVector RebaseOntoZeroOrigin (const FVector &Location, const class UActorComponent *const WorldContextActorComponent)
 

Public Attributes

FVector LinearVelocity
 
FVector AngularVelocity
 
FVector Location
 
FRotator Rotation
 
FVector Acceleration
 
uint8 bSimulatedPhysicSleep: 1
 
uint8 bRepPhysics: 1
 
uint8 bRepAcceleration: 1
 
int32 ServerFrame
 
int32 ServerPhysicsHandle = INDEX_NONE
 
EVectorQuantization LocationQuantizationLevel
 
EVectorQuantization VelocityQuantizationLevel
 
ERotatorQuantization RotationQuantizationLevel
 

Static Public Attributes

static ENGINE_API int32 EnableMultiplayerWorldOriginRebasing = 0
 

Detailed Description

Replicated movement data of our RootComponent. Struct used for efficient replication as velocity and location are generally replicated together (this saves a repindex) and velocity.Z is commonly zero (most position replications are for walking pawns).

Constructor & Destructor Documentation

◆ FRepMovement()

FRepMovement::FRepMovement ( )

Member Function Documentation

◆ CopyTo()

void FRepMovement::CopyTo ( FRigidBodyState RBState,
const AActor *const  Actor = nullptr 
) const
inline

◆ FillFrom()

void FRepMovement::FillFrom ( const FRigidBodyState RBState,
const AActor *const  Actor = nullptr,
int32  InServerFrame = 0 
)
inline

◆ NetSerialize()

bool FRepMovement::NetSerialize ( FArchive Ar,
class UPackageMap Map,
bool bOutSuccess 
)

◆ operator!=()

bool FRepMovement::operator!= ( const FRepMovement Other) const
inline

◆ operator==()

bool FRepMovement::operator== ( const FRepMovement Other) const
inline

◆ RebaseOntoLocalOrigin() [1/3]

FVector FRepMovement::RebaseOntoLocalOrigin ( const FVector Location,
const AActor *const  WorldContextActor 
)
static

Rebase zero-origin position onto an Actor's local world origin.

Rebase zero-origin position onto local world origin value based on an actor's world.

◆ RebaseOntoLocalOrigin() [2/3]

static ENGINE_API FVector FRepMovement::RebaseOntoLocalOrigin ( const FVector Location,
const class UActorComponent *const  WorldContextActorComponent 
)
static

Rebase zero-origin position onto local world origin value based on an actor component's world.

◆ RebaseOntoLocalOrigin() [3/3]

FVector FRepMovement::RebaseOntoLocalOrigin ( const FVector Location,
const FIntVector LocalOrigin 
)
static

Rebase zero-origin position onto local world origin value.

◆ RebaseOntoZeroOrigin() [1/3]

FVector FRepMovement::RebaseOntoZeroOrigin ( const FVector Location,
const AActor *const  WorldContextActor 
)
static

Rebase an Actor's local-origin position onto zero world origin value.

Rebase local-origin position onto zero world origin value based on an actor's world.

◆ RebaseOntoZeroOrigin() [2/3]

static ENGINE_API FVector FRepMovement::RebaseOntoZeroOrigin ( const FVector Location,
const class UActorComponent *const  WorldContextActorComponent 
)
static

Rebase local-origin position onto zero world origin value based on an actor component's world.

◆ RebaseOntoZeroOrigin() [3/3]

FVector FRepMovement::RebaseOntoZeroOrigin ( const FVector Location,
const FIntVector LocalOrigin 
)
static

Rebase local-origin position onto zero world origin value.

◆ SerializeQuantizedVector()

bool FRepMovement::SerializeQuantizedVector ( FArchive Ar,
FVector Vector,
EVectorQuantization  QuantizationLevel 
)

Member Data Documentation

◆ Acceleration

FVector FRepMovement::Acceleration

Acceleration of component in world space. Only valid if bRepAcceleration is set.

◆ AngularVelocity

FVector FRepMovement::AngularVelocity

Velocity of rotation for component (only valid if bRepPhysics is set)

◆ bRepAcceleration

uint8 FRepMovement::bRepAcceleration

If set, additional acceleration data will be replicated.

◆ bRepPhysics

uint8 FRepMovement::bRepPhysics

If set, additional physic data (angular velocity) will be replicated.

◆ bSimulatedPhysicSleep

uint8 FRepMovement::bSimulatedPhysicSleep

If set, RootComponent should be sleeping.

◆ EnableMultiplayerWorldOriginRebasing

int32 FRepMovement::EnableMultiplayerWorldOriginRebasing = 0
static

True if multiplayer rebasing is enabled, corresponds to p.EnableMultiplayerWorldOriginRebasing console variable

If true, origin rebasing is enabled in multiplayer games, meaning that servers and clients can have different local world origins.

◆ LinearVelocity

FVector FRepMovement::LinearVelocity

Velocity of component in world space

◆ Location

FVector FRepMovement::Location

Location in world space

◆ LocationQuantizationLevel

EVectorQuantization FRepMovement::LocationQuantizationLevel

Allows tuning the compression level for the replicated location vector. You should only need to change this from the default if you see visual artifacts.

◆ Rotation

FRotator FRepMovement::Rotation

Current rotation

◆ RotationQuantizationLevel

ERotatorQuantization FRepMovement::RotationQuantizationLevel

Allows tuning the compression level for replicated rotation. You should only need to change this from the default if you see visual artifacts.

◆ ServerFrame

int32 FRepMovement::ServerFrame

Server physics step

◆ ServerPhysicsHandle

int32 FRepMovement::ServerPhysicsHandle = INDEX_NONE

ID assigned by server used to ensure determinism by physics.

◆ VelocityQuantizationLevel

EVectorQuantization FRepMovement::VelocityQuantizationLevel

Allows tuning the compression level for the replicated velocity vectors. You should only need to change this from the default if you see visual artifacts.


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