Author Topic: UIDragObject KeepVisible doesn't work when you restart touch  (Read 5198 times)

DZP

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 17
    • View Profile
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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIDragObject KeepVisible doesn't work when you restart touch
« Reply #1 on: June 06, 2014, 09:35:58 PM »
Content rect should be the rect of what you're dragging, not "another UITexture".

DZP

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 17
    • View Profile
Re: UIDragObject KeepVisible doesn't work when you restart touch
« Reply #2 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.