UKismetMathLibrary::Vector_Right
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the Unreal Engine world right direction constant (0, 1, 0), the +Y axis.
Caveats & Gotchas
- • In Unreal's left-handed coordinate system, right is +Y. This differs from OpenGL's right-handed convention — be careful when translating math from external references.
- • This is the world right axis. For an actor's local right direction after rotation, call AActor::GetActorRightVector() instead.
Signature
static UE_INL_API FVector Vector_Right(); Return Type
FVector Example
Offset a spawned actor to the right C++
FVector RightOffset = UKismetMathLibrary::Vector_Right() * 150.0f;
FVector SpawnPos = ReferenceActor->GetActorLocation() + RightOffset;
GetWorld()->SpawnActor<AMyActor>(AMyActor::StaticClass(), SpawnPos, FRotator::ZeroRotator); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?