AActor::K2_AddActorWorldRotation
#include "GameFramework/Actor.h"
Access: public
Specifiers: UFUNCTIONBlueprintCallable
Description
Adds a delta rotation to the actor's current world-space rotation. The Blueprint-exposed counterpart to AddActorWorldRotation.
Caveats & Gotchas
- • bSweep is accepted but currently has no effect for rotation — sweeping during rotation is not implemented. Do not rely on SweepHitResult being populated.
- • In C++ prefer AddActorWorldRotation, which also accepts an FQuat overload for gimbal-lock-free rotation. Repeated FRotator additions can accumulate floating-point error; normalize periodically.
Signature
ENGINE_API void K2_AddActorWorldRotation(FRotator DeltaRotation, bool bSweep, FHitResult& SweepHitResult, bool bTeleport); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| DeltaRotation | FRotator | The change in rotation to apply in world space. | — |
| bSweep | bool | Whether to sweep during the rotation (not currently supported for rotation — has no effect). | — |
| SweepHitResult | FHitResult& | Output hit result; will not be populated since sweep is not supported for rotation. | — |
| bTeleport | bool | If true, physics velocity is preserved. If false, physics velocity is updated based on the angular displacement. | — |
Return Type
void Examples
Rotate the actor 5 degrees around the world Z axis each tick
Blueprint
Spin an actor 90 degrees around the Z axis C++
FHitResult Hit;
MyActor->K2_AddActorWorldRotation(FRotator(0.f, 90.f, 0.f), false, Hit, false); Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?