• RuntimesUnity
  • ArithmeticException NAN when changing time scale to high value

Hey, when I change the speed of my game at runtime by setting the time scale, I get this error. The time scale is 10.
There is another post that refers to this problem

https://en.esotericsoftware.com/forum/d/18468-nan-error-within-spine-code

ArithmeticException: Function does not accept floating point Not-a-Number values.
System.Math.Sign (System.Single value) (at <dc753a1061284f8e971ee88ee4826eee>:0)
Spine.ScaleTimeline.Apply (Spine.Skeleton skeleton, System.Single lastTime, System.Single time, Spine.ExposedList`1[T] firedEvents, System.Single alpha, Spine.MixBlend blend, Spine.MixDirection direction) (at ./Library/PackageCache/com.esotericsoftware.spine.spine-csharp@b41e9377bb/Animation.cs:786)
Spine.AnimationState.ApplyMixingFrom (Spine.TrackEntry to, Spine.Skeleton skeleton, Spine.MixBlend blend) (at ./Library/PackageCache/com.esotericsoftware.spine.spine-csharp@b41e9377bb/AnimationState.cs:435)
Spine.AnimationState.Apply (Spine.Skeleton skeleton) (at ./Library/PackageCache/com.esotericsoftware.spine.spine-csharp@b41e9377bb/AnimationState.cs:246)
Spine.Unity.SkeletonAnimation.ApplyAnimation () (at ./Library/PackageCache/com.esotericsoftware.spine.spine-unity@b41e9377bb/Runtime/spine-unity/Components/SkeletonAnimation.cs:260)
Spine.Unity.SkeletonAnimation.Update (System.Single deltaTime) (at ./Library/PackageCache/com.esotericsoftware.spine.spine-unity@b41e9377bb/Runtime/spine-unity/Components/SkeletonAnimation.cs:239)
Spine.Unity.SkeletonAnimation.Update () (at ./Library/PackageCache/com.esotericsoftware.spine.spine-unity@b41e9377bb/Runtime/spine-unity/Components/SkeletonAnimation.cs:219)
Related Discussions
...

In Time scale = 1, it happens as well but it is rare

The problem is when I blend idle, walk and run

@luciddream Sorry to hear you're having troubles. Which version of the spine-unity and spine-csharp runtime are you using? Are there any Physics Constraints involved (these might be configured unstable)?

If you're using the latest spine-unity 4.2 package and not using Physics Constraints: Could you please send us a minimal Unity project that still shows this issue? You can send it as a zip package to contact@esotericsoftware.com, briefly mentioning this forum thread URL so that we know the context. Then we can have a look at it.