Under review

Animation state bug - Playstation 4

mcyp 4 months ago in Game Creator updated 2 months ago 5

Hello again,

we came across another problem which seems to be a serious bug. We are making our game for PC, PS4 and XBOXONE and this problem, so far, happens on PS4. It doesn't happen in editor or in a build for PC (we haven't tested XBOXONE yet).

It's about animations or, to be more precise, animation states. Whenever we want to change the state of a character, for example we want it to be drunk or injured, we use the action "Change state in Layer X" and within, we assign a different state asset.  What happens on PS4 is that the animation state will change but only for the period of time that is defined by the transition time. So, if we leave it on default - the transition time being 0.25s, it will change the animation state but it will immediately return to its default state. If we set the transition time for, I don't know, 10s, the state will change and stay changed for those 10s but right after that, it will again reset itself to the default.

Using action for "gestures" is fine - animations will work as intended.

Using action to change the character's "default state" works - but this creates different problems and I believe this isn't how the system should work. Also, this is extremly problematic when using Melee module. In it, the shield asset has a part where you define the "Defend stance" using  animation state and because of this bug, the characters will try to use it but immediately snap back to default state. Not to mention the action "Melee blocking", which, as I understood, also tries to switch the animation state causes this bug as well.

I'm putting a video below which demonstrates the bug.


Unity version:
Game Creator version:
Under review

Sorry for the late reply. Strange that this only happens in PS4 platforms. My guess is that there's a problem with the Playables API's duration field.

Could you try updating to the latest Unity version? Unity 2019.4.5f. Unfortunately I don't have access to the PS4 SDK so it's a bit difficult to reproduce the issue. However, if after updating this issue persists, I can try a workaround, which may temporarily fix the issue.

In case you want to try it first, Gestures & States use the Playables API, which are node-like entities that are traversed every frame and calculate the resulting animation. Each of these nodes has a "Duration" field, which by default is set to 0, which means the playable will never "finish". Looks like Unity could be treating this value differently for PS4 and immediately finish the playable node. What I want to try is setting a duration of the biggest number possible. It's not an elegant solution, but might work.


we tried the new Unity version. No improvement. It still bugs out. Also, the same thing happens on the Xbox One console. So it seems the problem runs a bit deeper. 

We are going to try your last suggestion with changing the "Duration" field. I'll keep you posted if this helps.

By the way, about that "Duration" field. Did you mean a variable within a code or somewhere else? Cause we're having a hard time finding it. The only duration field we found was through PlayableGraph Visualizer but this is only for inspecting certain parameters and not for making changes.

Yeah, I meant in the Playables API. Particularly, you can directly modify the script in PlayableStateRTC, after line 43 add the following:


This should tell the state to have a very long duration, instead of a duration of 0, which is supposed to mean infinite, but maybe for consoles there's some error. Let me know if this works.

Apologies for the late reply. 

We did fix this by ourselves after rummaging through some forums. It seems the console platforms, at least Playstation and Xbox, do not like using a constant of the epsilon and need Mathf.Epsilon for proper functionality.