GizmoMath::RaySphereIntersection

Find the intersection of the ray defined by RayOrigin and RayDirection with the sphere defined by SphereOrigin and SphereRadius.

Windows
MacOS
Linux

References

Module

InteractiveToolsFramework

Header

/Engine/Source/Runtime/Experimental/InteractiveToolsFramework/Public/BaseGizmos/GizmoMath.h

Include

#include "BaseGizmos/GizmoMath.h"

Source

/Engine/Source/Runtime/Experimental/InteractiveToolsFramework/Private/BaseGizmos/GizmoMath.cpp

Syntax

namespace GizmoMath
{
    void GizmoMath::RaySphereIntersection
    (
        const FVector & SphereOrigin,
        const float SphereRadius,
        const FVector & RayOrigin,
        const FVector & RayDirection,
        bool & bIntersectsOut,
        FVector & SphereIntersectionPointOut
    )
}

Remarks

Find the intersection of the ray defined by RayOrigin and RayDirection with the sphere defined by SphereOrigin and SphereRadius. Returns intersection success/failure in bIntersectsOut and the intersection point in SphereIntersectionPointOut

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