RealDocs

AActor::AsyncPhysicsTickActor

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

Description

C++ virtual called each physics sub-step when async physics ticking is enabled. Override this instead of ReceiveAsyncPhysicsTick to add native logic; the default implementation fires the Blueprint event.

Caveats & Gotchas

  • This function executes on the physics thread. You must not access UObjects, actors, or components on the game thread from inside this override — use physics API only (e.g. direct component physics calls). Any game-thread access will cause race conditions.
  • Set bAsyncPhysicsTickEnabled = true (in the constructor) to enable this call path. Without it the function is never invoked regardless of how the virtual is overridden.
  • The base implementation calls ReceiveAsyncPhysicsTick(). If you override without calling Super, Blueprint graphs implementing that event will not fire.

Signature

virtual void AsyncPhysicsTickActor(float DeltaTime, float SimTime) { ReceiveAsyncPhysicsTick(DeltaTime, SimTime); }

Parameters

Name Type Description Default
DeltaTime float The physics sub-step delta time.
SimTime float Total accumulated simulation time since the simulation began.

Return Type

void

Example

Apply physics impulse each sub-step C++
// Constructor
AMyActor::AMyActor()
{
	bAsyncPhysicsTickEnabled = true;
}

void AMyActor::AsyncPhysicsTickActor(float DeltaTime, float SimTime)
{
	Super::AsyncPhysicsTickActor(DeltaTime, SimTime);
	// Safe: operate only on physics state
	if (UPrimitiveComponent* Root = Cast<UPrimitiveComponent>(GetRootComponent()))
	{
		Root->AddForce(TargetForce * DeltaTime, NAME_None, /*bAccelChange=*/true);
	}
}

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.