Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - BobbyPS

Pages: [1]
1
NGUI 3 Support / UIScrollView ignoring movement restriction bug
« on: April 10, 2014, 02:43:32 AM »
Hi there!  Very useful package.  Just ran into a bug and figured I would share.  There is a bug in the UIScrollView, line 746, instead of:
  1. if (offset.x != 0f || offset.y != 0f)
it needs to be:
  1. if (offset.x != 0f || offset.y != 0f || offset.z != 0f)

As the offset is still in world-space when that check is made, so for instance if you have a scroll-view and uicamera that have a 90 degree rotation around the y-axis, a horizontal dragging movement will be on the z-axis, which won't enter inside that if-statement in order to be clamped to zero by the movement restrictions, so your scroll view can start moving horizontally even if you have the movement direction set to vertical only.

Pages: [1]