FVector::Rotation

Return the [FRotator](API\Runtime\Core\Math\FRotator) orientation corresponding to the direction in which the vector points.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Math/Vector.h

Include

#include "Math/Vector.h"

Source

/Engine/Source/Runtime/Core/Private/Math/UnrealMath.cpp

Syntax

FRotator Rotation() const

Remarks

Return the FRotator orientation corresponding to the direction in which the vector points. Sets Yaw and Pitch to the proper numbers, and sets Roll to zero because the roll can't be determined from a vector.

Identical to 'ToOrientationRotator()' and preserved for legacy reasons.

Returns

FRotator from the Vector's direction.

See Also

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss