Page 1 of 1

Setting Bubbles Render Priority

Posted: Sat Jul 21, 2018 10:55 pm
by pegassy
Hello,

I noticed that the bubbles are obscured by other objects in the scene (i.e. standing next to a wall). Is there a way for bubbles to show in front of all other objects?

I tried to do this by physically changing their Z values and then making them smaller, but that also causes perspective issues.

Thank you for your help.

Re: Setting Bubbles Render Priority

Posted: Sun Jul 22, 2018 9:18 am
by Tony Li
Hi,

The typical way is to create a second camera. You can make it a child of the primary camera so its position aligns perfectly with the primary camera. Remove the UI layer from the primary camera's Culling Mask. Set the second camera's Depth higher than the primary camera, Clear Flags to Depth Only, and Culling Mask to the UI layer. Set the bubble canvas's layer to UI. The second camera will always render objects on the UI layer on top of anything the primary camera renders.

Re: Setting Bubbles Render Priority

Posted: Sun Jul 22, 2018 1:00 pm
by pegassy
Wonderful! Thank you so much.

Re: Setting Bubbles Render Priority

Posted: Sun Jul 22, 2018 1:46 pm
by Tony Li
Glad to help!