I am trying to allow multiple animation to be played simultaneously without overriding the previously playing animation .
I have been looking at some examples but none that has made things easier for me .
so if i have 10 animation slips and i press keys to play each clip one after the other all the clips should play without overriding any . thats the basic idea anyway .
here is the code i’m using .
using UnityEngine;
using System.Collections;
public class PlayClips : MonoBehaviour {
public Transform shipbody ;
// Use this for initialization
void Start () {
animation["OpenBackThrusters"].layer = 1;
animation["OpenBackThrusters"].AddMixingTransform(shipbody );
}
// Update is called once per frame
void Update () {
if (Input.GetKeyDown("d"))
{
animation.Play("RollRight");
}
if (Input.GetKeyDown("a"))
{
animation.Play("RollLeft");
}
if (Input.GetKeyDown("b"))
{
animation.Play ("ExtrudeWings");
animation.Blend("OpenBackThrusters");
}
if (Input.GetKeyDown("n"))
{
animation.Play("OpenCrackerShotVents");
}
if (Input.GetKeyDown("x"))
{
animation.Play("FlipOutRocketBlaster");
}
if (Input.GetKeyDown("m"))
{
animation.Play("OpenLazerBlasters");
}
if (Input.GetKeyDown("v"))
{
animation.Play("OpenSideVents");
}
}
}