It sounds like the issue you're encountering with the head/neck bone rotation during animation transitions might be related to how the animations are being mixed or set in Unity. Here are a few steps and considerations that might help you resolve the problem:
Check Animation Cleanup: Ensure that
Animation Cleanup
is disabled when exporting your skeleton from Spine. This setting can remove keys that are identical to the setup pose, which might cause issues when transitioning between animations.Preview in Unity: Verify if the animation looks correct in the Preview section of the Inspector window in Unity. If it looks correct there, the issue might be with the implementation in Unity. If it does not look correct, there might be an issue with the export from Spine.
Mix Duration: Since you mentioned that setting the mix duration to a value greater than 0 shows the head rotating to an incorrect angle, it might be worth experimenting with different mix durations or explicitly setting the mix duration for specific transitions to see if it resolves the issue.
SetToSetupPose: Ensure that the
setToSetupPose
method is not being called inappropriately in your code, as this can reset bones to their setup pose, potentially causing unexpected behavior during transitions.Check for Implementation Issues: Review the code where you are setting animations. Ensure that the
SetAnimation
method is being called correctly and that no other code is interfering with the animation state.Additional Keys: Make sure that all necessary keys are present in your animations. Sometimes, missing keys can cause bones to interpolate to unexpected positions.
If these steps do not resolve the issue, it might be helpful to send a minimal Unity project that demonstrates the problem to Esoteric Software for further investigation.