- Modifié
Play 2 animations on different part of the same character
Hello, i'm trying to mix 2 animations on my character, in unity. I'm using the unity animator
Both animation are using the full body when played alone.
Per example, i want to combine 2 annimations from these
1 Gun shoting animation
1 Running animation
1 Knife attack animation
1 Use a smartphone
I want to be able to play any of theses animation alone, or combined with one another. and animation dont start at the same time. (first i run for 1 secs, then i shot with the gun, then i take a photo with the smartphone, then i wtop walking..)
If it was 3D character, i would just use a avatar mask. but with spine i cannot do that.
Do you have any idea how to do this nicely ?
I'v think of one way, but it seem too complex.
- Having each animation in 4 version. The complete one, right handed. Another, with only the arm and torso animated right handed. and the same for left handed
- On unity animator, I have 2 layers, one "base" with the completes animations, and one "secondary" playing only when i got 2 animations at the same time. (with the animation using only half the skeleton)
When i play a skill, i use the "base" layer, with the complete animation, then if i add another skill, if i already have a skill working, i play the new on the second layer, so it will just overide what needed for the skill. and if the base animation is using a hand, i use the other hand on the second layer.
problem : if the base layer is using a "shot" then i play a "run". I cannot play it on the second layer. Because it use the complete body.
Or i could have all the "upper body" animation on the second layer. with, for each node a blend between the "full body animation" and the "part of the body animation". and when i play the animation, if it is thje only one, i play full body, else, i play the part" and when i play another skill, i just change the blend value to change from "full body" to "arm".
Is this possible, on unity, to flip the animation to chose to play it on the left or right part of the skeleton ?
Is there a mask system ?
Do you have an Idea how to do it ? Mine have big flaws
You could create additional animations for each "upperbody animation" where only part of the body is affected by setting the bones of those mask-out body parts to the reference pose in Spine. Spine supports multiple MixBlend
modes, with additive blend mode being useful for your scenario to override only parts of the character.
Wonse a écritIs this possible, on unity, to flip the animation to chose to play it on the left or right part of the skeleton ?
No, this is not even possible in Unity on non-humanoid characters.
Wonse a écritIs there a mask system ?
No.
tank you