FMath::VRandCone

Returns a random unit vector, uniformly distributed, within the specified cone ConeHalfAngleRad is the half-angle of cone, in radians.

References

Module

Core

Header

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

Include

#include "Math/UnrealMathUtility.h"

Source

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

Syntax

static FVector VRandCone
(
    FVector const & Dir,
    float ConeHalfAngleRad
)

Remarks

Returns a random unit vector, uniformly distributed, within the specified cone ConeHalfAngleRad is the half-angle of cone, in radians. Returns a normalized vector.

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