The info bubble
In a comic book, when a character says something, it's shown in a speech bubble. In many online social worlds, participants are represented by avatars and if you hover above someone's avatar, their name is displayed. I'll call this type of user interface an info bubble.
Info bubbles are located in world space at a specific 3D position, but the canvas should always be facing the camera. We can ensure this with a script.
In this example, we'll display the X, Z location of the
WalkTarget object (set up in the previous chapter), controlled by the
LookMoveTo.cs script. To add the info bubble, perform the following steps:
- From the Project panel, drag the
DefaultCanvasprefab directly into the Scene view on top of