Text

Summary

This behaviour will add a floating text box that is positioned in front of the object.

Parameters

Text

Type: Text Bindable Default: None

The text to be displayed on the label. This is usually bound to a property value.

Label

Type: Text Default: None

The name of the label.

Offset

Type: Vector3 Default: 0,1,0

This parameter specifies a positional offset to place the label from the indicated asset. Values are specified as X,Y,Z coordinates that shall be local to the containing asset.

Size

Type: Vector3 Default: 1,1,1

This parameter changes the size of the label. Values are specified as X,Y,Z coordinates that are local to the containing asset.

Color

Type: RGBA Color Default: 0,0,0,1

This parameter specifies the the color of the text. Values are designated as Red, Green, Blue and Alpha respectively, using normalized values from 0 to 1.

BGColor

Type: RGBA Color Default: 0,0,0,1

This parameter specifies the the color of the background. Values are designated as Red, Green, Blue and Alpha respectively, using normalized values from 0 to 1.

LabelColor

Type: RGBA Color Default: 0,0,0,1

This parameter specifies the the color of the label. Values are designated as Red, Green, Blue and Alpha respectively, using normalized values from 0 to 1.

Level

Type: Text Default: Text Overlay

This parameter allows you to assign the text object to a Level, allowing the user to toggle it on and off by enabling or disabling the level layer it is on. By default, a Level named Text Overlay will be created for it and any other Text objects that are created in the scene.

LockToCam

Type: Text Default: False

This parameter allows you to set the Text Overlay to be facing the camera at all times.

Examples

  <Text color="1,1,1,1" offset="2,0,-0.8" size="0.3,0.3,0.3" text="[Speed]"/>

Displays the speed property of the asset.

The label will be 1/3 of the size of the asset itself, with the label 2 units in front and 0.8 units down from the center. The text will be white.

Notes

The text boxes created by this effect do not spin with rotating assets. However, the text boxes may exhibit a small amount of pulsing movement (either side-to-side or forwards and backwards) when the are attached to parts of a model that spin.

This is due to the model it is attached to not being at its original aspect ratio. If you find the movement severe or off-putting, setting the parent object to the original aspect ratio (by clicking the 'link' button when scaling the asset) should eliminate the problem.