UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAsyncPhysicsInputRewindCallback Struct Reference
+ Inheritance diagram for FAsyncPhysicsInputRewindCallback:

Public Member Functions

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

Public Attributes

UWorldWorld = nullptr
 
FOnDispatchPhysicsTick DispatchPhysicsTick
 
int32 CachedServerFrame = 0
 
- Public Attributes inherited from Chaos::IRewindCallback
Chaos::FRewindDataRewindData = nullptr
 

Constructor & Destructor Documentation

◆ FAsyncPhysicsInputRewindCallback()

FAsyncPhysicsInputRewindCallback::FAsyncPhysicsInputRewindCallback ( UWorld InWorld)
inline

Member Function Documentation

◆ InjectInputs_External()

virtual void FAsyncPhysicsInputRewindCallback::InjectInputs_External ( int32  PhysicsStep,
int32  NumSteps 
)
inlineoverridevirtual

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.

◆ ProcessInputs_External()

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

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.

◆ TriggerRewindIfNeeded_Internal()

virtual int32 FAsyncPhysicsInputRewindCallback::TriggerRewindIfNeeded_Internal ( int32  LatestStepCompleted)
inlineoverridevirtual

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.

Member Data Documentation

◆ CachedServerFrame

int32 FAsyncPhysicsInputRewindCallback::CachedServerFrame = 0

◆ DispatchPhysicsTick

FOnDispatchPhysicsTick FAsyncPhysicsInputRewindCallback::DispatchPhysicsTick

◆ World

UWorld* FAsyncPhysicsInputRewindCallback::World = nullptr

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