2D Toolkit Forum
2D Toolkit => Support => Topic started by: midasmax on July 10, 2013, 01:34:01 pm
-
Hey everyone,
I'm getting started with using tk2dUI for handling GUIs. Based on the documentation online, it makes use of an Orthographic camera. I'm currently using a tk2dCamera to handle everything on my scene, and if I use thattogether with a BasicButton everything works.
But if i create a separate Orthographic camera, the button no longer responds to clicks. I was wondering if that's even necessary in the first place (having a separate camera), and if so, what is the best practice for doing so?
Thanks!
-
You need a UI Manager (created via tk2d menu) in your scene to handle the tk2d gui items. Assign your current camera to the public variable in the UI manager.
-
You don't NEED a separate ortho camera, as long as you're willing to resize the sprites and controls correctly. Basically - the included templates are set up to work with a normal camera, ortho size 1 out of the box.
You can mix and match and use the same tk2dCamera too, should you choose to do so.
-
Thank you to both of you for your advice!
I think I've gotten the hang of it! The demos certainly helped a lot!