UKismetMathLibrary::FindClosestPointOnLine

Find the closest point on an infinite line to a given point.

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 FindClosestPointOnLine
(
    FVector Point,
    FVector LineOrigin,
    FVector LineDirection
)

Remarks

Find the closest point on an infinite line to a given point.

Returns

The closest point on the line to the given point.

Parameters

Parameter

Description

Point

Point for which we find the closest point on the line.

LineOrigin

Point of reference on the line.

LineDirection

Direction of the line. Not required to be normalized.

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