UGameplayStatics::ProjectWorldToScreen

Transforms the given 3D world-space point into a its 2D screen space coordinate.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Kismet/GameplayStatics.h

Include

#include "Kismet/GameplayStatics.h"

Source

/Engine/Source/Runtime/Engine/Private/GameplayStatics.cpp

Syntax

static bool ProjectWorldToScreen
(
    APlayerController const * Player,
    const FVector & WorldPosition,
    FVector2D & ScreenPosition,
    bool bPlayerViewportRelative
)

Remarks

Transforms the given 3D world-space point into a its 2D screen space coordinate.

Parameters

Parameter

Description

Player

Project using this player's view.

WorldPosition

World position to project.

ScreenPosition

(out) Corresponding 2D position in screen space

bPlayerViewportRelative

Should this be relative to the player viewport subregion (useful when using player attached widgets in split screen)

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback