Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Aurigan on May 24, 2016, 09:32:10 AM
-
The bug is:
* have a bouncy horizontal scrollview
* use the mouse wheel to scroll the contents so that they're squished against the side
* they'll smoothly animate back to the edge (as expected)
* then the contents jerk to a new position (for me ~100px offset from where they should be)
This looked like it was being caused by mScroll never dropping to 0 (I was seeing 3x10^-30 or something tiny like that). As a quick hack/fix I changed this in UIScrollView:
if (mMomentum.magnitude > 0.0001f || mScroll != 0)
to
if (mMomentum.magnitude > 0.0001f || Mathf.Abs(mScroll) > 0.0001f)
-
Thanks, I'll add your change locally and see if it causes any adverse effects on my end. If not, it will be there in the next update.