RealDocs

USlateBlueprintLibrary::AbsoluteToLocal

function UMG Blueprint Since 4.7
#include "Blueprint/SlateBlueprintLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintPure

Description

Transforms a point from absolute Slate space into a widget's local space. This is the Blueprint-accessible wrapper around FGeometry::AbsoluteToLocal.

Caveats & Gotchas

  • Absolute space in Slate is not the same as screen pixel space — do not feed raw OS mouse coordinates here. Use ScreenToWidgetLocal if you have screen-space pixel positions.
  • Involves an accumulated render-transform matrix inverse under the hood. For repeated conversions against the same geometry (e.g., many points in one frame) consider calling FGeometry::AbsoluteToLocal directly in C++ to avoid repeated Blueprint overhead.

Signature

static UMG_API FVector2D AbsoluteToLocal(const FGeometry& Geometry, FVector2D AbsoluteCoordinate)

Parameters

Name Type Description Default
Geometry const FGeometry& The geometry of the target widget.
AbsoluteCoordinate FVector2D Point in absolute Slate space (window or desktop space).

Return Type

FVector2D

Example

Find where inside a widget an absolute position lands C++
FVector2D LocalPos = USlateBlueprintLibrary::AbsoluteToLocal(
	MyWidget->GetCachedGeometry(),
	AbsoluteHitPosition
);
// LocalPos.X / LocalPos.Y are now relative to the widget's top-left.

Version History

Introduced in: 4.7

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.