AActor::GetResimulationThreshold
#include "GameFramework/Actor.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Returns the positional error threshold in centimeters beyond which this actor should force a physics resimulation when the Network Physics Prediction system is active.
Caveats & Gotchas
- • Only relevant when Physics Prediction is enabled (experimental feature in UE 5.x) — in standard projects this returns a default value that is never acted upon.
- • The threshold is defined on the actor's root component; if the root component is not a physics-simulating primitive, the return value is undefined and should not be used for gameplay logic.
- • Setting a very low threshold (e.g. < 1 cm) will cause frequent resimulations which are expensive — tune carefully in conjunction with your network tick rate.
Signature
ENGINE_API float GetResimulationThreshold() const; Return Type
float Example
Log resimulation threshold for a physics actor C++
if (MyActor->CanTriggerResimulation())
{
float ThresholdCm = MyActor->GetResimulationThreshold();
UE_LOG(LogPhysics, Verbose,
TEXT("%s resim threshold: %.2f cm"), *MyActor->GetName(), ThresholdCm);
} See Also
Tags
Version History
Introduced in: 5.4
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?