RealDocs

AActor::ReceiveAsyncPhysicsTick

function Engine Blueprint Since 5.0
#include "GameFramework/Actor.h"
Access: public Specifiers: UFUNCTIONBlueprintImplementableEventENGINE_API

Description

Blueprint implementable event called every physics sub-step when async physics ticking is enabled on this actor. Override AsyncPhysicsTickActor() in C++ for the equivalent native hook.

Caveats & Gotchas

  • Async physics ticking runs on the physics thread, not the game thread. You must not read or write any game-thread state (actors, components, UObjects) from inside this event — doing so will cause race conditions.
  • This event only fires when bAsyncPhysicsTickEnabled is set to true on the actor. The flag is false by default.
  • SimSeconds is the total physics simulation time, not wall-clock time. It advances in fixed sub-steps and is not the same as GetWorld()->GetTimeSeconds().

Signature

UFUNCTION(BlueprintImplementableEvent, meta = (DisplayName = "Async Physics Tick"))
ENGINE_API void ReceiveAsyncPhysicsTick(float DeltaSeconds, float SimSeconds);

Parameters

Name Type Description Default
DeltaSeconds float The physics sub-step delta time, which may be smaller than the game frame delta.
SimSeconds float Total accumulated simulation time since the simulation began.

Return Type

void

Example

C++ override via AsyncPhysicsTickActor C++
// Header
virtual void AsyncPhysicsTickActor(float DeltaTime, float SimTime) override;

// Implementation — runs on physics thread
void AMyActor::AsyncPhysicsTickActor(float DeltaTime, float SimTime)
{
	// Only interact with physics state here, never with game-thread UObjects
	if (UPrimitiveComponent* Prim = GetRootPrimitiveComponent())
	{
		Prim->AddForce(FVector(0.f, 0.f, 100.f));
	}
}

Version History

Introduced in: 5.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.