AActor::GetActorUpVector
#include "GameFramework/Actor.h"
Access: public
Specifiers: constUFUNCTIONBlueprintCallable
Description
Returns the unit up vector (local +Z axis) of this actor in world space, derived from the RootComponent's world rotation.
Signature
FVector GetActorUpVector() const Return Type
FVector Caveats & Gotchas
- • Returns FVector::UpVector (0,0,1) if the actor has no RootComponent.
- • For actors on slopes or with a non-identity rotation, this is not the same as world up. Use FVector::UpVector when you need absolute world-up.
Example
Apply thrust along actor up axis C++
MyMesh->AddForce(GetActorUpVector() * ThrustForce); Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?