USlateBlueprintLibrary::LocalToViewport

Translates local coordinate of the geometry provided into local viewport coordinates.

Windows
MacOS
Linux

References

Module

UMG

Header

/Engine/Source/Runtime/UMG/Public/Blueprint/SlateBlueprintLibrary.h

Include

#include "Blueprint/SlateBlueprintLibrary.h"

Source

/Engine/Source/Runtime/UMG/Private/SlateBlueprintLibrary.cpp

Syntax

static void LocalToViewport
(
    UObject * WorldContextObject,
    const FGeometry & Geometry,
    FVector2D LocalCoordinate,
    FVector2D & PixelPosition,
    FVector2D & ViewportPosition
)

Remarks

Translates local coordinate of the geometry provided into local viewport coordinates.

Parameters

Parameter

Description

PixelPosition

The position in the game's viewport, usable for line traces and other uses where you need a coordinate in the space of viewport resolution units.

ViewportPosition

The position in the space of other widgets in the viewport. Like if you wanted to add another widget to the viewport at the same position in viewport space as this location, this is what you would use.

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