UKismetMathLibrary::GetPointDistanceToLine

Find the distance from a point to the closest point on an infinite line.

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/Classes/Kismet/KismetMathLibrary.inl

Syntax

static float GetPointDistanceToLine
(
    FVector Point,
    FVector LineOrigin,
    FVector LineDirection
)

Remarks

Find the distance from a point to the closest point on an infinite line.

Returns

The distance from the given point to the closest point on the line.

Parameters

Parameter

Description

Point

Point for which we find the distance to 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