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

#include <NetworkPhysicsComponent.h>

+ Inheritance diagram for FNetworkPhysicsCallback:

Public Member Functions

 FNetworkPhysicsCallback (UWorld *InWorld)
 
virtual void InjectInputs_External (int32 PhysicsStep, int32 NumSteps) override
 
virtual void ProcessInputs_External (int32 PhysicsStep, const TArray< Chaos::FSimCallbackInputAndObject > &SimCallbackInputs)
 
virtual void ProcessInputs_Internal (int32 PhysicsStep, const TArray< Chaos::FSimCallbackInputAndObject > &SimCallbackInputs) override
 
virtual void PreResimStep_Internal (int32 PhysicsStep, bool bFirst) override
 
virtual void PostResimStep_Internal (int32 PhysicsStep) override
 
virtual int32 TriggerRewindIfNeeded_Internal (int32 LatestStepCompleted) override
 
virtual void RegisterRewindableSimCallback_Internal (Chaos::ISimCallbackObject *SimCallbackObject) override
 
virtual void UnregisterRewindableSimCallback_Internal (Chaos::ISimCallbackObject *SimCallbackObject) override
 
- Public Member Functions inherited from Chaos::IRewindCallback
virtual ~IRewindCallback ()=default
 
virtual void ApplyCallbacks_Internal (int32 PhysicsStep, const TArray< ISimCallbackObject * > &SimCallbackObjects)
 
virtual void SetResimDebugInfo_Internal (const FResimDebugInfo &ResimDebugInfo)
 

Public Attributes

FOnPreProcessInputsInternal PreProcessInputsInternal
 
FOnPostProcessInputsInternal PostProcessInputsInternal
 
FOnInjectInputsExternal InjectInputsExternal
 
UWorldWorld = nullptr
 
TArray< Chaos::ISimCallbackObject * > RewindableCallbackObjects
 
- Public Attributes inherited from Chaos::IRewindCallback
Chaos::FRewindDataRewindData = nullptr
 

Detailed Description

Network physics rewind callback to manage all the sim callbacks rewind functionalities

Constructor & Destructor Documentation

◆ FNetworkPhysicsCallback()

FNetworkPhysicsCallback::FNetworkPhysicsCallback ( UWorld InWorld)
inline

Member Function Documentation

◆ InjectInputs_External()

void FNetworkPhysicsCallback::InjectInputs_External ( int32  PhysicsStep,
int32  NumSteps 
)
overridevirtual

Called before inputs are split into potential sub-steps and marshalled over to the physics thread. The physics state has not been applied yet, and cannot be inspected anyway because this is triggered from the external thread (game thread) Gives user the ability to call GetProducerInputData_External one last time. Input data is shared amongst sub-steps. If NumSteps > 1 it means any input data injected will be shared for all sub-steps generated

Reimplemented from Chaos::IRewindCallback.

◆ PostResimStep_Internal()

void FNetworkPhysicsCallback::PostResimStep_Internal ( int32  PhysicsStep)
overridevirtual

Called after each rewind step. This is to give user code the opportunity to trigger other code after each rewind step Usually to simulate external systems that ran in lock step with the physics sim

Reimplemented from Chaos::IRewindCallback.

◆ PreResimStep_Internal()

void FNetworkPhysicsCallback::PreResimStep_Internal ( int32  PhysicsStep,
bool  bFirstStep 
)
overridevirtual

Called before each rewind step. This is to give user code the opportunity to trigger other code before each rewind step Usually to simulate external systems that ran in lock step with the physics sim

Reimplemented from Chaos::IRewindCallback.

◆ ProcessInputs_External()

void FNetworkPhysicsCallback::ProcessInputs_External ( int32  PhysicsStep,
const TArray< Chaos::FSimCallbackInputAndObject > &  SimCallbackInputs 
)
virtual

Called before any inputs are marshalled over to the physics thread. The physics state has not been applied yet, and cannot be inspected anyway because this is triggered from the external thread (game thread) Gives user the ability to modify inputs or record them - this can help with reducing latency if you want to act on inputs immediately

Reimplemented from Chaos::IRewindCallback.

◆ ProcessInputs_Internal()

void FNetworkPhysicsCallback::ProcessInputs_Internal ( int32  PhysicsStep,
const TArray< Chaos::FSimCallbackInputAndObject > &  SimCallbackInputs 
)
overridevirtual

Called before any sim callbacks are triggered but after physics data has marshalled over This means brand new physics particles are already created for example, and any pending game thread modifications have happened See ISimCallbackObject for recording inputs to callbacks associated with this PhysicsStep

Reimplemented from Chaos::IRewindCallback.

◆ RegisterRewindableSimCallback_Internal()

virtual void FNetworkPhysicsCallback::RegisterRewindableSimCallback_Internal ( Chaos::ISimCallbackObject Callback)
inlineoverridevirtual

Register a sim callback onto the rewind callback

Reimplemented from Chaos::IRewindCallback.

◆ TriggerRewindIfNeeded_Internal()

int32 FNetworkPhysicsCallback::TriggerRewindIfNeeded_Internal ( int32  LatestStepCompleted)
overridevirtual

Called after sim step to give the option to rewind. Any pending inputs for the next frame will remain in the queue Return the PhysicsStep to start resimulating from. Resim will run up until latest step passed into RecordInputs (i.e. latest physics sim simulated so far) Return INDEX_NONE to indicate no rewind

Reimplemented from Chaos::IRewindCallback.

◆ UnregisterRewindableSimCallback_Internal()

virtual void FNetworkPhysicsCallback::UnregisterRewindableSimCallback_Internal ( Chaos::ISimCallbackObject Callback)
inlineoverridevirtual

Unregister a sim callback from the rewind callback

Reimplemented from Chaos::IRewindCallback.

Member Data Documentation

◆ InjectInputsExternal

FOnInjectInputsExternal FNetworkPhysicsCallback::InjectInputsExternal

◆ PostProcessInputsInternal

FOnPostProcessInputsInternal FNetworkPhysicsCallback::PostProcessInputsInternal

◆ PreProcessInputsInternal

FOnPreProcessInputsInternal FNetworkPhysicsCallback::PreProcessInputsInternal

◆ RewindableCallbackObjects

TArray<Chaos::ISimCallbackObject*> FNetworkPhysicsCallback::RewindableCallbackObjects

◆ World

UWorld* FNetworkPhysicsCallback::World = nullptr

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