Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: tonyM on September 10, 2013, 05:53:25 PM
-
Hi guys,
I have a moving sprite on screen. Is there any way how I can check if it moved off screen bounds please?
Thanks.
-
NGUITools.CalculateAbsoluteWidgetBounds gives you the bounds. Get the min/max points and convert them to screen space. Check to see if they're both off-screen.
-
Thanks for that.
Actually it was NGUIMath.CalculateAbsoluteWidgetBounds(go.transform);