UKismetMathLibrary::GetPointDistanceToSegment

Find the distance from a point to the closest point on a segment.

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 GetPointDistanceToSegment
(
    FVector Point,
    FVector SegmentStart,
    FVector SegmentEnd
)

Remarks

Find the distance from a point to the closest point on a segment.

Returns

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

Parameters

Parameter

Description

Point

Point for which we find the distance to the closest point on the segment.

SegmentStart

Start of the segment.

SegmentEnd

End of the segment.

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