Twitching Spine animations on some Android

Hi guys please help me with the next problem. In my game there is a bug and it is related to the Spin animation. Most Android phones are all good, but some parts (like Asus Zenfone 3 and some other models on android 8) see twitch animations. All the spine animations are shaking terribly and twitching fast! I can’t figure out how to fix this. I use Dragon bones, though I doubt it matters .
You can check yourself if you have a phone with android 8+version. Link install https://play.google.com/store/apps/details?id=com.cosmic.swiftrun

Hmm, odd, I don’t see how the Android version really has much to do with it though. Anyone have any ideas what could be wrong?

I can’t say for sure what it is because of the Android version. Maybe it’s something else.

Can you please share the spine model?

sheep.zip (1.1 MB)

What positions does the sheep have when it starts to jitter?

I suspect it might have something to do with precision in the shader that the spine models use. I did a quick highly non-scientific test on two different Android devices;

     Device |   mediump | highp
     ------------------------------
        S8+ |     ~1000 | ~39071268
         S3 | ~39071268 | ~39071268

The numbers are the x positions where I experienced jittering using different precision qualifiers.

You could make a copy of the spine.material and spine.vp inside builtins/materials/, make the new spine.material point to the new spine.vp. Inside spine.vp try changing mediump to highp for view_proj and position, like this:

uniform highp mat4 view_proj;

// positions are in world space
attribute highp vec4 position;

Lastly make sure your spine models point to the new material!

This is how the jitter looked to me, is it something like this you are experiencing?

6 Likes

Thanks for your reply! Shake animation is just about the same as you have in the video. Changing the Shader will solve the problem?

1 Like

It’s definitely worth a try! :slight_smile:

Did you also have the same issue with a twitching spine animation or are you talking about something else?