GizmoMath::NearestPointOnLine

Find the nearest point to QueryPoint on the line defined by LineOrigin and LineDirection.

Choose your operating system:

Windows

macOS

Linux

References

Module

InteractiveToolsFramework

Header

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

Include

#include "BaseGizmos/GizmoMath.h"

Source

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

Syntax

namespace GizmoMath
{
    void GizmoMath::NearestPointOnLine
    (
        const FVector & LineOrigin,
        const FVector & LineDirection,
        const FVector & QueryPoint,
        FVector & NearestPointOut,
        float & LineParameterOut
    )
}

Remarks

Find the nearest point to QueryPoint on the line defined by LineOrigin and LineDirection. Returns this point and the associated line-equation parameter