Same size for world space bark UI regardless of distance

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hearsedriver
Posts: 19
Joined: Tue Dec 17, 2019 6:16 am

Same size for world space bark UI regardless of distance

Post by hearsedriver »

I am struggling with the Simple Bark UI. When the camera is close to the speaker, the text is too huge.

I would love to combine the effects of a world space and screen overlay UI: constant font size on the screen regardless of the camera position and distance, but correctly positioned in the 3D world. Is there something similar to "Always Face Camera", which doesn't update the rotation but the size, or is there something which updates the bark position on a screen overlay depending on camera and entity transformation?

Also, bark text which exceeds the viewport isn't wrapped automatically. Having that, too, would be the icing on the cake! Is that even possible?

Thanks!
User avatar
Tony Li
Posts: 21977
Joined: Thu Jul 18, 2013 1:27 pm

Re: Same size for world space bark UI regardless of distance

Post by Tony Li »

Hi,

Please see the "UI Smooth Follow" example on the Dialogue System Extras page.

World space canvases are positioned in the world, so they'll be bigger or smaller based on camera distance.

The UI Smooth Follow example uses a screen space UI that moves to follow a position in the 3D world. The example demonstrates a subtitle panel, but you can use the same script for a bark UI.

To constrain a bubble (or any UI panel) to a maximum width, see this post.

Another option is to use Lively Chat Bubbles.
Post Reply