UKismetMathLibrary::FindClosestPointOnSegment

Find the closest point on a segment 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/Classes/Kismet/KismetMathLibrary.inl

Syntax

static FVector FindClosestPointOnSegment
(
    FVector Point,
    FVector SegmentStart,
    FVector SegmentEnd
)

Remarks

Find the closest point on a segment to a given point.

Returns

The closest point on the segment to the given point.

Parameters

Parameter

Description

Point

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