Speech Bubbles in World Space issue

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Escara
Posts: 78
Joined: Sun Dec 30, 2018 4:55 am

Speech Bubbles in World Space issue

Post by Escara »

Hi Tony.

I hope you're well.

I was wondering if there's a way to keep the speech bubbles above the player within world space? A few of my scenes are several screens wide and I have parallax 2d scrolling (so just the one 2d camera that tracks the Player in AC). The problem is when the Player speaks to the NPC that follows her in random places, the speech bubbles seem to have a mind of their own for both characters. I hope the below images demonstrate the issue(s). Is there anything I can do?






Many thanks,

Caroline
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Speech Bubbles in World Space issue

Post by Tony Li »

Hi Caroline,

Are you still using a separate camera for the speech bubbles? (See step 6 of this post for a reminder.)

If so, make sure that camera is a child of the main camera, and that its Transform is positioned at (0,0,0) so it exactly matches the main camera's position.

If you're zooming the camera in and out, or if you don't want to deal with a separate camera for the speech bubbles, then I have a different suggestion for 2D that will allow you to use a single camera instead. You can simply adjust the bubble's Z distance from the camera so it's closer than the rest of the scene objects:

Image

Then get rid of the UICamera, and set the main camera's Layer Mask to include the "UI" layer.
Escara
Posts: 78
Joined: Sun Dec 30, 2018 4:55 am

Re: Speech Bubbles in World Space issue

Post by Escara »

Hi Tony.

Thanks for your reply. Yes I set up the UI camera exactly how you previously stated. I'll try your other suggestion tonight and see how I get on. It's odd as it only happens in this particular scene. In another scene where I have parallax scrolling, it works fine. I'll probably do a comparison and see if I've done something different.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Speech Bubbles in World Space issue

Post by Tony Li »

Hi Caroline,

When it happens, pause the game and check the positions of the camera as well as their Size values. If they aren't the same, then it's probably easiest to do the single camera setup.
Escara
Posts: 78
Joined: Sun Dec 30, 2018 4:55 am

Re: Speech Bubbles in World Space issue

Post by Escara »

Hi Tony.

After all that, I managed to do a bit of tweaking of the positions and size of the cameras and it now works perfectly. Sorry, it wasn't even a DS related query in the end but thanks once again for your awesome assistance!
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Speech Bubbles in World Space issue

Post by Tony Li »

Glad to help, and especially glad to hear it's working once again!
Post Reply