- Home /
Animations play simultaneously
I am trying to use AddMixingTransform to play 2 animations at the same time by telling the walk animation to only affect the left and right ankles. My script dose not seem to work.
Javascript
var al : boolean = true; function Start () {
}
function Update () {
if(al){
var mix : Transform = transform.Find("Ankle_L/Ankle_R");
animation["walk"].AddMixingTransform(mix);
}
}
Thanks in advanced and if you know another way to play 2 animations at once please tell me.
Answer by Piflik · Dec 18, 2012 at 08:26 AM
Not sure about mixing transforms, but you can use different animation layers and set the second animation to be additive to play two animations simultaneously.
Would this work if if the walk animation also affects the arms and the other animation affects only the arms.
Haven't tried it myself, I only used completely separate animations, but as far as I know (and according to the reference), the higher the layer, the earlier the animation gets assigned weights and lower animations only get weights, if there are some left. If your arms animation uses the weights completely, the walk animation should not affect the arms.