FSnappingUtils::SnapLocationToNearestVertex

Snaps a location to the nearest vertex

Windows
MacOS
Linux

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/SnappingUtils.h

Include

#include "SnappingUtils.h"

Source

/Engine/Source/Editor/UnrealEd/Private/SnappingUtils.cpp

Syntax

static bool SnapLocationToNearestVertex
(
    FVector & Location,
    const FVector2D & MouseLocation,
    FLevelEditorViewportClient * ViewportClient,
    FVector & OutVertexNormal,
    bool bDrawVertHelpers
)

Remarks

Snaps a location to the nearest vertex

Returns

true if anything was snapped

Parameters

Parameter

Description

Location

The location to snap

MouseLocation

The current 2d mouse location. Vertices closer to the mouse are favored

ViewportClient

The viewport client being used

OutVertexNormal

The normal at the closest vertex

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