Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Dedede on May 20, 2012, 05:57:58 AM

Title: Jittery Scroll List on iPhone
Post by: Dedede on May 20, 2012, 05:57:58 AM
I tried to recreate a simple iPhone like scroll list, with the draggable camera feature, in the editor everything works smoothly, but on the iOS device itself (iPhone and iPad) the scrolling is very jittery, and not like the iPhone smoothness at all.
I also tried to just build the scroll list example on the iPhone and the same problem persists. I already set the fps cap to 60, but no luck.

Any ideas how I can achieve the scroll list effect, with the smoothness apple products are known for?

Thank you.
Title: Re: Jittery Scroll List on iPhone
Post by: ArenMook on May 20, 2012, 06:11:51 AM
Can you try building the clipping-based scroll view instead of the camera?
Title: Re: Jittery Scroll List on iPhone
Post by: Dedede on May 20, 2012, 06:52:28 AM
Just tested it, set targetFramerate to 60, Quality settings on simple as default, build it on an iPhone 4 and iPad 2, still very laggy. :(

Am I the only one, who has those problems? Strangely everything else works smoothly.

On another note:
when the list is scrolled with the finger or mouse still touching and not moving anymore, if you let go, there is still momentum applied, even in the absolute low momentum settings. Shouldnt the momentum only be applied, if you let go while still in a dragging motion?
Title: Re: Jittery Scroll List on iPhone
Post by: ArenMook on May 20, 2012, 07:34:39 AM
What version are you using? That was fixed a while ago
Title: Re: Jittery Scroll List on iPhone
Post by: Dedede on May 20, 2012, 07:59:28 AM
What exactly? The lagginess or the momentum?

I was still using 2.0.4, now made an empty project and updated to 2.0.6, but the momentum is still added, when completely holding still, although its a bit different from before. I intentionally scroll, hold down my finger still for a few seconds, let go, and the list still moves a bit. Maybe tweaking the sensitivity down would do the trick.
Sadly the jittery scrolling persists with the new version as well.
Title: Re: Jittery Scroll List on iPhone
Post by: ArenMook on May 20, 2012, 08:11:21 AM
Well, the camera scroll view shouldn't be jittery for certain. It doesn't need shaders, it doesn't modify anything while you're moving it, and there is nothing slowing down the framerate at all. What is your FPS while the camera scroll view is running vs when you're scrolling about? The framerate while standing still should match the framerate while scrolling around. If yours is below expectations, I suggest starting to look at other causes. As I understand, when before you had to set target framerate inside Xcode, now you can specify it in the editor?
Title: Re: Jittery Scroll List on iPhone
Post by: Dedede on May 20, 2012, 12:38:52 PM
Alright, I made some tests with the framerate. Interestingly the problem seems to stem from Unity in general.
I have set out a 4 page example project, with a black taskbar at the bottom, which switches between the 4 pages.

The FPS is constantly on 60 FPS, but when I switch to the page with the camera scroll view, it dips down to 55.
It seems that the problem lies in the cameras clear flags. If a camera is used as an overlay with "Don't clear", the framerate decreases noticeably. Only on iPhone 4 though, the iPad 2 can handle everything at 60 FPS.

Is there anyone else, who experienced the same problems with multiple cameras on the iPhone?
Title: Re: Jittery Scroll List on iPhone
Post by: ArenMook on May 20, 2012, 12:40:17 PM
It's because of overdraw. Mobile devices don't handle drawing to the same pixel more than once per frame very well.