BillboardGui¶
Class ยท server and client scripts
BillboardGui anchors a 2D UI canvas to a 3D world entity so it always faces the camera. Access it through entity.BillboardGui.
Example
Target¶
Target is the entity the canvas floats over; nil uses the entity's parent.
UnitsOffset¶
UnitsOffset shifts the canvas in camera space: X right, Y up, and Z toward the camera, in world units.
Width¶
Width is the canvas width in UI points, scaled like the HUD.
Height¶
Height is the canvas height in UI points, scaled like the HUD.
AnchorX¶
AnchorX is the horizontal point on the canvas placed at the anchor: 0 is the left edge and 1 is the right edge.
AnchorY¶
AnchorY is the vertical point on the canvas placed at the anchor: 0 is the top edge and 1 is the bottom edge.
MaxDistance¶
MaxDistance hides the canvas past this distance in world units, fading over the last 30 percent; 0 never hides by distance.
AlwaysOnTop¶
AlwaysOnTop draws the canvas over world geometry instead of depth-testing behind walls.
ClampToScreen¶
ClampToScreen keeps the canvas on screen when its world anchor moves outside the viewport.
EdgeFadeStart¶
EdgeFadeStart is the normalized device coordinate distance past the screen edge where a clamped canvas starts fading.
EdgeFadeEnd¶
EdgeFadeEnd is the normalized device coordinate distance past the screen edge where a clamped canvas hides; 0 never hides.
ViewerDistance¶
ViewerDistance hides the canvas past this distance from the viewer's character, fading over the last 30 percent; 0 never hides.