Language:
Discover
By Skill Level
By Category

FMath::VRandCone

Choose your OS:

Syntax

static [CORE_API](API\Runtime\Core\Misc\CORE_API_1)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.

References

Module

Core

Header

Runtime/Core/Public/Math/UnrealMathUtility.h

Source

Runtime/Core/Private/Math/UnrealMath.cpp