BillboardGui

BillboardGui : SurfaceGuiBase

Overview

BillboardGui is a UI container used to make the 2D UI elements (GuiObject) placed in 3D space face the camera at all times. The position of this container is determined relatively by the connected BasePart or a specified Adornee.

In addition, BillboardGui internally caches rendering results and reuse them when there are no changes to optimize performance. However, if the properties of BillboardGui itself are changed, the properties of child elements are changed, or child elements are added or removed, the screen information is recalculated in the next rendering frame.

properties except PlayerToHideFrom can be controlled only in client environment.

Properties

DistanceLowerLimit

float

The distance at which the BillboardGui stops scaling up when it gets too close to the player's camera.

Code Samples

local BillboardGui = script.Parent

print(BillboardGui.DistanceLowerLimit)

DistanceUpperLimit

float

The distance at which the BillboardGui stops scaling down when it gets too far from the player's camera.

Code Samples

ExtentsOffsetWorldSpace

Vector3

A property that can be used to specify the distance between BillboardGui and rendering object when displaying BillboardGui.

It is calculated based on the world coordinate system and offsets are adjusted by using the size of the Axis Aligned Bound Box (AABB) of a model as half the unit.

Code Samples

PlayerToHideFrom

Player

Specifies BillboardGui so that it will not be displayed to specific players.

Code Samples

PositionOffset

Vector3

A property that can be used to specify the distance between BillboardGui and rendering object in centimeters when displaying BillboardGui.

Moving direction is calculated based on the direction to which camera is currently facing.

Code Samples

PositionOffsetWorldSpace

Vector3

A property that can be used to specify the distance between BillboardGui and rendering object in centimeters when displaying BillboardGui.

Moving direction is calculated based on target object.

Code Samples

SizeOffset

Vector2

A property that can be used to specify the distance between BillboardGui and rendering object in centimeters when displaying BillboardGui.

Moving direction is calculated based on screen plane.

Code Samples

Methods

Events

See aslo

GUI

Last updated