Dialogue Always On Screen

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
wattoo
Posts: 16
Joined: Sun Oct 05, 2014 2:40 am

Dialogue Always On Screen

Post by wattoo »

Hi,



So our game has only two characters, the player and something else. During gameplay, the player is always on screen, but the other character mostly isn't, but they do talk to each other all the time. However, at the moment if the NPC is off screen, so is his dialogue. I need it to be on screen at all times.



On the NPC there was a couple of options I couldn't find explained. Check if Player Visible and Visibility Layer Mask. Should either of these help achieve what I want?



If not, could I achieve want I want by making an object a child of the camera and having NPC's dialogue appear on that or is that a terrible hack?



Thank you
User avatar
Tony Li
Posts: 20773
Joined: Thu Jul 18, 2013 1:27 pm

Dialogue Always On Screen

Post by Tony Li »

Hi,



It depends on what GUI system you're using. For the Unity GUI Bark UI, assign a child of the camera to the Text Position property. It's designed to support this.



Check If Player Visible and Visiblity Layer Mask are for a different purpose. They run a raycast between the NPC and the player. If an obstacle, such as a wall, is in the way, it temporary hides the bark text. For example, if an NPC is inside a house and the player is outside, with a wall blocking them, you might not want to show the bark text.
Post Reply