RealDocs

UActorComponent::UpdateComponentToWorld

function Engine Since 4.0
#include "Components/ActorComponent.h"
Access: public Specifiers: virtual

Description

Recalculates the component-to-world transform matrix. The base UActorComponent implementation is a no-op; USceneComponent overrides this to propagate transform changes through the attachment hierarchy.

Caveats & Gotchas

  • The base implementation in UActorComponent is intentionally empty — only components with a scene transform (USceneComponent and subclasses) do meaningful work here.
  • Calling this directly is rarely correct in game code; prefer SetWorldLocation/SetRelativeLocation which call it internally with correct flags.
  • Passing ETeleportType::TeleportPhysics suppresses physics body wakeup, which can leave sleeping physics objects visually detached from the component.

Signature

virtual void UpdateComponentToWorld(EUpdateTransformFlags UpdateTransformFlags = EUpdateTransformFlags::None, ETeleportType Teleport = ETeleportType::None){}

Parameters

Name Type Description Default
UpdateTransformFlags EUpdateTransformFlags Flags controlling which parts of the transform hierarchy are updated. EUpdateTransformFlags::None
Teleport ETeleportType Whether the movement should be treated as a teleport, skipping interpolation and physics wakeup. ETeleportType::None

Return Type

void

Example

Force an immediate transform update in a custom component C++
// In a custom USceneComponent subclass after manually modifying ComponentToWorld:
void UMySceneComponent::ForceTransformSync()
{
	UpdateComponentToWorld(EUpdateTransformFlags::None, ETeleportType::None);
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.