RealDocs

AActor::AddActorLocalRotation

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

Description

Adds a delta rotation to this actor in its own local reference frame. Use this when rotating relative to the actor's current facing rather than world axes.

Signature

void AddActorLocalRotation(FRotator DeltaRotation, bool bSweep=false, FHitResult* OutSweepHitResult=nullptr, ETeleportType Teleport = ETeleportType::None)

Parameters

Name Type Description Default
DeltaRotation FRotator The delta rotation to add in actor-local space.
bSweep bool Whether to sweep and check for blocking collision along the rotation arc. Sweep is not currently supported for rotation and has no effect. false
OutSweepHitResult FHitResult* Optional hit result from the sweep, if bSweep is true. nullptr
Teleport ETeleportType Whether to teleport physics state. ETeleportType::TeleportPhysics preserves velocity; ETeleportType::None updates it based on the rotation change. ETeleportType::None

Return Type

void

Caveats & Gotchas

  • A second overload accepts FQuat instead of FRotator: AddActorLocalRotation(const FQuat& DeltaRotation, ...).
  • Rotation sweep is not implemented — bSweep has no effect on rotation-only moves.
  • For world-space rotation deltas, use AddActorWorldRotation() instead.

Example

Spin an actor around its own up axis each tick C++
void AMyActor::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);
    AddActorLocalRotation(FRotator(0.f, 90.f * DeltaTime, 0.f));
}

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.