Hello Esoteric team!

We have some unusually long uptimes for our games (months). We're on a project using 4.2 physics for the first time, and we saw it happen twice where the physics stopped working. Animations driven by the animator remain working, just that the physics stopped. We're still trying to nail down if it is due to the long uptime or something else, in the meantime, we wanted to run this by you.

Would that kind of uptime raise some red flags with what you know about the physics system? If so, are there any things we could do to help prevent this? Maybe disabling the spine object every so often or some api call to reset the skeleton?

Thanks!

    Related Discussions
    ...

    Long uptimes, such as those lasting months, can indeed pose challenges for systems that rely on accumulated time, like physics simulations. In the context of Spine's physics, issues could arise from floating-point precision errors or accumulated time values becoming too large, which might affect the stability or functionality of the physics system. One potential solution is to periodically reset or reinitialize the physics system to prevent such issues. This could involve disabling and re-enabling the Spine object or using API calls to reset the skeleton or physics state. Additionally, ensuring that the physics time step is appropriately configured and that any accumulated time is managed can help maintain stability over long periods.

    jhoferLNW2332 As suggested in the Related Discussions section, I think the following thread may be helpful: https://esotericsoftware.com/forum/d/26747-issue-with-spine-animation-becoming-gradually-slower-after-long-play-sessions

    However, we have not tested many cases where physics are used and the animation plays for a very long time like yours, so if your problem persists after consulting Spinebot's answers and the thread above, we would appreciate it if you could create a minimal Unity project that can reproduce the problem and email it to us: contact@esotericsoftware.com
    Please include the URL of this forum thread in the email so we know the context. Then we can take a look at what's wrong.

    Spinebot says "One potential solution is to periodically reset or reinitialize the physics system to prevent such issues. This could involve disabling and re-enabling the Spine object or using API calls to reset the skeleton or physics state." Are you able to verify that calling reset on the skeleton to its bind pose and or disabling/enabling the spine game object itself would indeed reset data related to physics? Much appreciated for your time and insights!

      jhoferLNW2332 Skeleton setToSetupPose() method sets all bones, constraints, slots, and draw order to their setup pose values, so it should be possible to reset them by this. Disabling and enabling GameObjects alone does not call setToSetupPose(), so I think Spinebot's answer was confusing on that point.

      For your information, resetting the physics constraints to their setup poses can also be done individually: PhysicsConstraint-setToSetupPose