UKismetMathLibrary::Quat_VectorRight
#include "Kismet/KismetMathLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintPure
Description
Returns the right direction (local Y axis) after applying this quaternion's rotation. Semantic alias for Quat_GetAxisY.
Caveats & Gotchas
- • Functionally identical to Quat_GetAxisY. In Blueprints the display name 'Vector Right (Quat)' may be clearer in graphs that work with directional vectors.
- • UE uses a left-handed coordinate system where right = +Y. Cross-product results involving this vector will follow left-hand-rule conventions.
Signature
static UE_INL_API FVector Quat_VectorRight(const FQuat& Q); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Q | const FQuat& | The quaternion representing the orientation. | — |
Return Type
FVector Example
Offset camera to the right of a character C++
FQuat CharQuat = CharacterMesh->GetComponentQuat();
FVector RightDir = UKismetMathLibrary::Quat_VectorRight(CharQuat);
FVector CameraOffset = RightDir * ShoulderOffsetDistance;
CameraComponent->SetWorldLocation(GetActorLocation() + CameraOffset); See Also
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?