Author Topic: UIScrollView dithering after changing dampenStrength  (Read 5956 times)

etzerg

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
UIScrollView dithering after changing dampenStrength
« on: November 17, 2015, 10:53:14 PM »
Dear NGUI's Author:

Thank you for designing this great UI system.

I'm a game developer in Taiwan, using NGUI 3.9.4.

Recently we try to optimize our scroll-view UI, let them behave more like Apple's.

So I change the UIScrollView's code:

Line 967:
Vector3 offset = NGUIMath.SpringDampen (ref mMomentum, 1.6f, delta);

Line 418:
SpringPanel.Begin (mPanel.gameObject, pos, 13f) .strength = 22f;

Let them have smaller resistance when scrolling but larger resistance when moving out of bounds.

After doing this, I found that UIScrollView's animation dithering when restricting within bounds.

I'm wondering why ?

Is there a way to correct this problem ?

Or Is there a better way to adjust our UI ?

Thanks a lot & have a nice day! :D

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIScrollView dithering after changing dampenStrength
« Reply #1 on: November 18, 2015, 04:11:37 PM »
Animation dithering? Not sure what you mean...

etzerg

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: UIScrollView dithering after changing dampenStrength
« Reply #2 on: November 20, 2015, 02:01:38 AM »
Hello, thanks for reply,

The strange part is: it doesn't happen every time, and it happened under certain combination of two dampen strength.

My test environment is: unity 4.6.8 on win 7, open scene [ Example 7 - Scroll View (Panel) ] in editor,

Using my setting, and sometimes you will see the scroll-view move to final position not very smoothly.