Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: laurentl on August 06, 2013, 10:43:37 PM

Title: draggable panel work once but not twice
Post by: laurentl on August 06, 2013, 10:43:37 PM
very weird glitch here
anyone encountered that?
https://www.youtube.com/watch?v=eQ3EJgvHAC8
Title: Re: draggable panel work once but not twice
Post by: ArenMook on August 07, 2013, 05:05:33 AM
Try enabling debugging on the UICamera to see what the mouse is hovering over.
Title: Re: draggable panel work once but not twice
Post by: laurentl on August 07, 2013, 05:21:29 PM
When I turn on debug in UICamera and turn on gizmos in the game view nothing gets highlighted.
Title: Re: draggable panel work once but not twice
Post by: ArenMook on August 08, 2013, 09:48:41 AM
UICamera's debug is a run-time feature. Play the game. Hover mouse over something.
Title: Re: draggable panel work once but not twice
Post by: laurentl on August 13, 2013, 11:26:15 PM
UICamera reset debug to false, probably as a safety measure

I see it displays the current ray hit, the draggable elements are getting hit but do not drag anymore after a few drags.
The colliders are active, so are UIDraggablePanel and UIDragPanelContent and... I just know what happened, DisableDragIfFits was on :)

So I turn it off but now I can drag the items out of the screen. How would I rubber band it when dragged out of frame?
Title: Re: draggable panel work once but not twice
Post by: ArenMook on August 15, 2013, 07:52:33 AM
Disable dragging if fits will prevent dragging if the content is fully visible.

In that video not all the content is visible.

However one other thing I noticed: you have very weird scales. It's generally a bad idea to use scales other than (1, 1, 1) with NGUI (not including widgets). It's an even worse idea to use non-uniform scales like you do in there. As a rule of thumb, if you select the UIRoot, hit ALT+SHIFT+P and something changes visibly, then you should reconsider what you're doing.