Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/Blueprint > API/Runtime/UMG/Blueprint/UWidgetLayoutLibrary
References
| Module | UMG |
| Header | /Engine/Source/Runtime/UMG/Public/Blueprint/WidgetLayoutLibrary.h |
| Include | #include "Blueprint/WidgetLayoutLibrary.h" |
| Source | /Engine/Source/Runtime/UMG/Private/WidgetLayoutLibrary.cpp |
static bool ProjectWorldLocationToWidgetPosition
&40;
APlayerController &42; PlayerController,
FVector WorldLocation,
FVector2D & ScreenPosition,
bool bPlayerViewportRelative
&41;
Remarks
Gets the projected world to screen position for a player, then converts it into a widget position, which takes into account any quality scaling. true if the position projects onto the screen.
Parameters
| Name | Description |
|---|---|
| PlayerController | The player controller to project the position in the world to their screen. |
| WorldLocation | The world location to project from. |
| ScreenPosition | The position in the viewport with quality scale removed and DPI scale remove. |
| bPlayerViewportRelative | Should this be relative to the player viewport subregion (useful when using player attached widgets in split screen or when aspect-ratio constrained) |