Game Development Reference
In-Depth Information
How it works...
The
BitmapText
class is spatial, and needs to be attached to a node in order to be dis-
played. The most common node is probably the
guiNode
. Spatials added to the
guiNode
will be positioned according to the screen space and projected without depth.
For this reason, using the
guiNode
is suitable for
HUD
items. Setting the
loc-
alTranslation
parameter to
(0, 0, 0)
will make the text appear in the bottom-left
corner of the screen. Instead of using (
screenWidth, 0, screenHeight
), we will
place it in the top-right corner.