FMath::SphereConeIntersection

Assumes the cone tip is at 0,0,0 (means the SphereCenter is relative to the cone tip)

Windows
MacOS
Linux

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 bool SphereConeIntersection
(
    const FVector & SphereCenter,
    float SphereRadius,
    const FVector & ConeAxis,
    float ConeAngleSin,
    float ConeAngleCos
)

Remarks

Assumes the cone tip is at 0,0,0 (means the SphereCenter is relative to the cone tip)

Returns

true: cone and sphere do intersect, false otherwise

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