Navigation
API > API/Editor > API/Editor/CurveEditor > API/Editor/CurveEditor/FCurveEditorAxisSnap
Description
Combines an InitialPosition and mouse movement to produce a final position that respects the axis snapping settings. Pressing shift ignores the snapping settings.
For example, if movement is constrained to x-axis only and the mouse moves in direction FVector2D{ 100, 200 }, only the delta movement of FVector2D{ 100, 0} is applied.
| Name | GetSnappedPosition |
| Type | function |
| Header File | /Engine/Source/Editor/CurveEditor/Public/CurveEditorSnapMetrics.h |
| Include Path | #include "CurveEditorSnapMetrics.h" |
FVector2D GetSnappedPosition
(
const FVector2D & InitialPosition,
const FVector2D & LastPosition,
const FVector2D & CurrentPosition,
const FPointerEvent & MouseEvent,
FSnapState & InOutSnapState,
const bool bIgnoreAxisLock
)
The end position resulting from applying the snapping behavior to the mouse movement.