UKismetMathLibrary::RandomUnitVectorInEllipticalConeInRadiansFromStream

Returns a random vector with length of 1, within the specified cone, with uniform random distribution.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/KismetMathLibrary.h

Include

#include "Kismet/KismetMathLibrary.h"

Source

/Engine/Source/Runtime/Engine/Private/KismetMathLibrary.cpp

Syntax

static FVector RandomUnitVectorInEllipticalConeInRadiansFromStream
(
    const FVector & ConeDir,
    float MaxYawInRadians,
    float MaxPitchInRadians,
    const FRandomStream & Stream
)

Remarks

Returns a random vector with length of 1, within the specified cone, with uniform random distribution. The shape of the cone can be modified according to the yaw and pitch angles.

Parameters

Parameter

Description

MaxYawInRadians

The yaw angle of the cone (from ConeDir to horizontal edge), in radians.

MaxPitchInRadians

The pitch angle of the cone (from ConeDir to vertical edge), in radians.

Stream

The random stream from which to obtain the vector.

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