- Modifié
Blending animations
This is probably not an original post / question, but can animation done with spine mix / blend animations in unity? (ie. Upper body doing its thing / anim while lower body keeps walkinh or also doing its thing)
If so can someone redirect me to what / where i should look into to figure this out?
You mean playing two animations at the same time for different body parts?
The syntax looks like this:
void Start () {
var skeletonAnimation = GetComponent<SkeletonAnimation>();
var animationState = skeletonAnimation.state;
animationState.SetAnimation(0, "legs run", true); // play running animation for legs on track 0 in a loop
animationState.SetAnimation(1, "gun shoot", false); // play gun shooting animation for the gun on track 1 once
}
If you checked the example scenes in the spine-unity.unitypackage, you will find that the Raptor sample does this.
Great thanks Pharan!