Page 1 of 1

Dialogue Always On Screen

Posted: Wed Oct 22, 2014 1:03 am
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

Dialogue Always On Screen

Posted: Wed Oct 22, 2014 3:27 am
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.