Avindr / MxM-IssueTracking

7 stars 0 forks source link

Single Keyframe animations in Blend spaces cause the preprocessor to hang on compilation #58

Closed Westerveld closed 4 years ago

Westerveld commented 4 years ago

Reproduction steps:

  1. Add 2 single keyframe animations to a blend tree.
  2. Process the animation data
  3. Notice how the processor gets stuck on the single keyframe animation clips.

Use case: In our game the character needs to be able to weave the opponents hits. In mechanim we used single keyframe animation clips to blend between the different weave directions. We are trying to recreate this in MxM.

freyzor commented 4 years ago

Does adding a second identical keyframe to the clips bypass the issue? That would leave you with at least two frames. might work as a workaround.

Avindr commented 4 years ago

If all goes well I'll have a fix for this in the next release.

In the meantime, the workaround is to just have more frames of the exact same pose in the animation clip.

Avindr commented 4 years ago

I have fixed the freeze that occurs at runtime with a clip that has zero time (2018.4LTS). This will be included with v2.2.6.

However, it seems that no matter what I do, Unity's playable graph doesn't want to play a clip with a time of 0. It just plays the default muscle space pose. There doesn't seem to be any way that I can change this behaviour on the playable graph.

I recommend testing if it works for you or not. If it plays the muscle space pose like I mentioned, I suggest sticking with the workaround of having at least 2 identical frames to achieve the same result.