Tween smoothness issues


#21
  1. Enabling the device pixel ratio, increases the jittering.

  2. Disabling real time shadows on the light, decreases the jittering making the animation almost fully smooth.

Thinking it might be just the performance/fps achieved. Could you enable the profiler and check the frame rate?

(sorry just saw your comment regarding performance, you already checked that, though it might make sense to check with the profiler if there is any spike on some timer)


#22

Yeah, on our latest game, we did some extensive profiling to try to figure out why the iOS version had jittering while the Android version was smooth. We never found a solution. In that case, the game “performed” better on a cheap Huawei phone than an iPhone XS, but considering that the iPhone is five times more powerful i seriously doubt this has anything to do with actual performance :confused:


#23

Okay, I tried running your script, but nothing out of the ordinary is showing up

id;dt
0;16.66800000000012
1;16.66800000000012
2;16.667999999999665
3;16.66800000000012
4;16.66800000000012
5;16.66800000000012
6;16.667999999999665
7;16.66800000000012
8;16.66800000000012
9;16.66800000000012
10;16.667999999999665
11;16.66800000000012
12;16.66800000000012
13;16.667999999999665
14;16.66800000000012
15;16.66800000000012
16;16.66800000000012
17;16.667999999999665
18;16.66800000000012
19;16.66800000000012
20;16.66800000000012
21;16.667999999999665
22;16.66800000000012
23;16.66800000000012
24;16.66800000000012
25;16.667999999999665
26;16.66800000000012
27;16.66800000000012
28;16.66800000000012
29;16.667999999999665
30;16.66800000000012
31;16.66800000000012
32;16.667999999999665
33;16.66800000000012
34;16.66800000000012
35;16.66800000000012
36;16.667999999999665
37;16.66800000000012
38;16.66800000000012
39;16.66800000000012
40;16.667999999999665
41;16.66800000000012
42;16.66800000000012
43;16.66800000000012
44;16.667999999999665
45;16.66800000000012
46;16.66800000000012
47;16.667999999999665
48;16.66800000000012
49;16.66800000000012
50;16.66800000000012

That’s probably because this is not an issue with dt inside PlayCanvas. Our current theory (or at least the theory proposed by my more knowledgeable co-workers :slight_smile:) is that it has something to do with how PlayCanvas instructs the browser to update the animation frames. That would explain why some browsers on some OS’es display perfectly smooth motion while others are jittering. I don’t think it’s unreasonable to assume that Chrome on Mac and iOS works differently than Chrome on Windows and Android :thinking:


#24

OK. You didn’t mention initially that your concern was IOS and Mac OS. I was reporting Windows 10 behavior. And on Windows 10, I find Chrome consistently smoother running than Firefox.


#25

Maybe. Unless the issue is related to single threaded performance?


#26

I’m not sure of the case with MacOS, but my understanding is that on iOS, Apple requires third party browsers to use one of two native browser components to render and display web content. WKWebView is the more modern and recommended default and UIWebView is the legacy option and is slower. So perhaps the issue is related to which web engine is being used by the particular browsers on iOS (and maybe even MacOS). Or more likely, the issue is how the various browsers have implemented these components.