2D Toolkit Forum

2D Toolkit => Support => Topic started by: Matt-Cranktrain on September 11, 2013, 02:14:19 pm

Title: GUI Elements with Two Cameras
Post by: Matt-Cranktrain on September 11, 2013, 02:14:19 pm
Hi, I've got a tk2dCamera for viewing game sprites, and I'm making use of ZoomFactor to zoom in and out. However, when I add a UI element, or a TK2dTextMesh they get scaled down as well.

I've seen the occasional reference to creating another camera to use simultaneously, just to view interface objects alone, but I haven't been able to work out the proper configuration.

Can someone please step me through how that works?
Title: Re: GUI Elements with Two Cameras
Post by: unikronsoftware on September 11, 2013, 06:22:12 pm
In 2D Toolkit 2.2, check demo 3 - 3D UI. That gives you an example of a 3D and 2D camera set up correctly. The thing that makes it work properly is the camera "Depth" property and the "Clear Flags".
Title: Re: GUI Elements with Two Cameras
Post by: Matt-Cranktrain on September 12, 2013, 09:27:04 am
That works wonderfully, thank you.