Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: DZP on June 06, 2014, 10:02:38 AM

Title: UIDragObject KeepVisible doesn't work when you restart touch
Post by: DZP on June 06, 2014, 10:02:38 AM
I have a UIDragObject script attached to a UITexture where the drag effect is set to 'momentum', the Keep Visible flag ticked and the ContentRect set up to be another UITexture.

If I click on the object and drag it around it stays roughly within the bounds of the other UITexture. However, if I drag the object to one of the boundaries and lift my finger off the mouse button, then click again and start dragging up I get to drag the object out of bounds for about another 20% before it catches it again. I can do it repeatedly until the object is well out of the bounds of the content rect.

I am using the current version of NGUI and Unity 4.3.

Thanks.
Title: Re: UIDragObject KeepVisible doesn't work when you restart touch
Post by: ArenMook on June 06, 2014, 09:35:58 PM
Content rect should be the rect of what you're dragging, not "another UITexture".
Title: Re: UIDragObject KeepVisible doesn't work when you restart touch
Post by: DZP on June 24, 2014, 04:41:11 AM
Thats unfortunate, I was being lazy and hoping there was functionality for dragging a widget within the bounds of another widget. Thanks for replying.