AActor::TornOff
#include "GameFramework/Actor.h"
Access: public
Specifiers: virtual
Description
Called on the client when this actor is torn off from replication (bTearOff == true), meaning the server will no longer replicate it. The actor continues to exist and simulate locally on the client.
Caveats & Gotchas
- • After TornOff fires, the actor is fully autonomous on clients — no further server updates will arrive. Physics simulation and animations will diverge from the server immediately. Design your tear-off logic to be visually plausible without ongoing correction.
- • TornOff is only called on clients; the server never calls it. Gate any client-only effects inside this function with !HasAuthority() to be safe.
Signature
virtual void TornOff() Return Type
void Example
Enable local ragdoll physics when torn off C++
void AMyCharacter::TornOff()
{
Super::TornOff();
// Enable physics simulation locally — no more server corrections
GetMesh()->SetSimulatePhysics(true);
GetMesh()->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?