UEditorEngine::SnapObjectTo

Snaps an actor in a direction. Optionally will align with the trace normal.

Windows
MacOS
Linux

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Classes/Editor/EditorEngine.h

Include

#include "Editor/EditorEngine.h"

Source

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

Syntax

bool SnapObjectTo
(
    FActorOrComponent Object,
    const bool InAlign,
    const bool InUseLineTrace,
    const bool InUseBounds,
    const bool InUsePivot,
    FActorOrComponent InDestination,
    TArray< FActorOrComponent > ObjectsToIgnore
)

Remarks

Snaps an actor in a direction. Optionally will align with the trace normal.

Returns

Whether or not the actor was moved.

Parameters

Parameter

Description

InActor

Actor to move to the floor.

InAlign

Whether or not to rotate the actor to align with the trace normal.

InUseLineTrace

Whether or not to only trace with a line through the world.

InUseBounds

Whether or not to base the line trace off of the bounds.

InUsePivot

Whether or not to use the pivot position.

InDestination

The destination actor we want to move this actor to, NULL assumes we just want to go towards the floor

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