• RuntimesUnity
  • The abnormal jittering issue with the Spine 4.2 physical in Unity

I would like to extend my sincere gratitude to the Spine team for their excellent physics system. However, I am currently experiencing some issues with my physically-based model in Unity when using velocity to control movement:

The images controlled by the physics system are experiencing high-frequency abnormal jitter, even when I reduce the position and rotation values of Physics Inheritance. This problem can only be alleviated, but not completely eliminated. Reducing the Fixupdate time interval will improve the situation, but it is not feasible in terms of performance, so I would like to seek a solution to this problem. Thank you!

My Unity version: 2020.3.24f1c2
My Spine version: 4.2.37

Related Discussions
...

The issue you're experiencing with high-frequency jitter in your physics-based model in Unity using Spine 4.2 could be related to the fixed time step used by Spine's physics system. As mentioned in the context, Spine's physics runs at a fixed time step to improve stability, and this can cause issues if your application renders frames faster than the physics updates. One potential solution is to adjust the FPS setting on the physics constraints, which defaults to 60. However, changing this setting can affect the physics behavior, so you may need to adjust other physics settings to maintain the desired look. Additionally, ensure you are using the latest version of the spine-unity runtime, as updates often include bug fixes and improvements that might address your issue.

  • RABScallion ответили на это сообщение.

    Spinebot Thank you for your reply, but I'm afraid my issue hasn't been resolved. No matter how I adjust the physical simulation frame rate of Spine and the time interval of Fix update in Unity (even if they are the same or multiple), there is still a noticeable abnormal jitter, with only some changes in the frequency and amplitude of the jitter. In fact, what I want to say is that when I use Unity's built-in Hint Joint 2D simulation, the same shaking problem occurs when changing the velocity to move it, which confuses me a lot

    Harald Thank you, I have reviewed the link you provided and did not expect this to be such a complex issue. However, as many parameters of my project depend on a fixed physical update frequency, it may not be possible to change them. The other method of interpolating between two physical states may be too complex for me, and due to technical and English proficiency limitations, it is difficult for me to understand the principles and how to implement it. I am very sorry.
    So I think I can only temporarily give up the interaction of the physical system in Unity and instead do keyframe animations of the wind and gravity parameters of the physical system in Spine to achieve the effect I want. I have to say that I think this is a pity, and I really hope that the production team can optimize this issue in version 4.3. Thank you again.

    @RABScallion I would not recommend to abandon physics constraints completely, sorry if the other thread was not easy to understand.

    You could integrate the following commit into your installation of the spine-unity runtime by changing just a few lines:
    EsotericSoftware/spine-runtimesa5a14aa
    This will make physics non-deterministic (not precisely repeatable), but this should usually not be a problem.

    The following commit should also be integrated, as it fixes issues the original poster encountered with large deltaTime (e.g. due to slow-motion or pausing).
    EsotericSoftware/spine-runtimesdcdf993

    We hope that this helps with your issue. If you need further help, just let us know.

    • RABScallion ответили на это сообщение.

      Harald Thank you very much for your patience! After using the modification plan you provided, the problem has indeed improved a lot - although it has not been completely fixed, after adjusting the various values of Physics Inheritance, the shaking is difficult to detect, and the visual effect of the model has reached a completely acceptable level. Thank you for helping me solve this problem, thank you for your hard work, and wish you a wonderful day!

      • Nate оценил это.

      @RABScallion Very glad to hear it helped, thanks for getting back to us! We hope that it will be even better with 4.3. Have a wonderful day!