FRandomStream::VRandCone

Returns a random unit vector, uniformly distributed, within the specified cone.

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Math/RandomStream.h"

Syntax

FVector VRandCone
(
    FVector const & Dir,
    float HorizontalConeHalfAngleRad,
    float VerticalConeHalfAngleRad
) const

Remarks

Returns a random unit vector, uniformly distributed, within the specified cone.

Returns

Normalized vector within the specified cone.

Parameters

Parameter

Description

Dir

The center direction of the cone

HorizontalConeHalfAngleRad

Horizontal half-angle of cone, in radians.

VerticalConeHalfAngleRad

Vertical half-angle of cone, in radians.

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