Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: duggo42 on May 13, 2015, 10:00:00 PM
-
Hey Everyone,
I'm trying to make a draggable camera only active when the user has zoomed in enough that a particular UITexture no longer completely fits on the screen. Is there a way to detect when any of the UITexture's edges are no longer visible by the camera?
Thanks in advance!
-
Okay, I just attached a collider to it and used the collider's bounds to get this information through Camera.WorldToViewportPoint().
If anyone knows if it's possible just through NGUI functions, it'd be cool to hear.
-
Have a look at UIPanel.IsVisible(a, b, c, d).
-
Will do. Thanks!