Hello, I'm working on a project using Spine and Unity, and I'm encountering an issue with blending animations. Here are the details of my setup:
Unity Version: 2022.3.17f1
Spine SDK Version: 4.2
Question
In my current setup, I have lower body animations playing on Track 0 and upper body animations on Track 1 in Spine. I want to transition to a full body animation on Track 0, but I'm struggling to find a way to smoothly blend both the upper and lower body animations. Is there a method to achieve this?
Background:
In our project, we have both walking and attacking motions. The walking motion involves swinging arms and legs, while the attacking motion involves holding a gun with both hands. We received a request to allow attacking while walking, and I was asked if we needed to create both a walking attack motion and a regular attack motion. I suggested that we could blend animations by creating separate upper body and lower body animations.
We successfully created an upper body attack animation and a lower body walking animation, achieving the desired movement. However, when transitioning back to the full body walking motion, the blend feels awkward. I would like to know how to return to the full body animation without any noticeable issues.
What I've Tried:
SkeletonAnimation.AnimationState.ClearTrack(1);
This causes the upper body motion to freeze, resulting in an awkward mix.
SkeletonAnimation.AnimationState.SetEmptyAnimation(1, 0.25f);
This briefly returns to a default state, which can feel awkward depending on the motion.
Adjusting the MixDuration of SetEmptyAnimation
This sometimes improves or worsens the transition depending on the motion.
Setting an animation with no keys on Track 1 using SetAnimation
This results in a similar effect as SetEmptyAnimation.
If No Good Solution Exists:
1.Create all animations as full body animations.
2.Create all animations as separate upper and lower body animations.
I believe option 2 might be better due to reusability, but I would appreciate any advice on which approach is preferable.
(I'm using GPT for translation as I'm not confident in my English. I apologize for any mistakes.)