Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: joelsantos on November 09, 2012, 08:52:52 PM

Title: OnPress changing objects
Post by: joelsantos on November 09, 2012, 08:52:52 PM
Hi there and first of all sorry if this a repeated question but after several searches I didn't found an answer to this.

Can someone tell me a way of using NGUI to track several objects while the user is clicking/touching?

What I mean is something like.. The user presses an object and without letting go changes from pressing one object to another.. And then another and then another.. And I want to get the objects that the user is passing the mouse/finger over while clicking/touching.
Is there any way to do this trough NGUI?

I am trying to add an UICamera to the main camera with the event listener to the layer nothing and setting it to fallback to my game manager.. But the far as I went was retrieving the screen coordinates..


Thanks in advance
Title: Re: OnPress changing objects
Post by: ArenMook on November 10, 2012, 11:30:49 AM
UICamera.hoveredObject always tells you what's curently under the mouse, so in your Update function just keep an eye on it (if the mouse button is down).