I have a run animation and a punch animation. The punch animation is only animating the top half of the character, legs are untouched. The run animation animates the whole body of the character.
Run animation is on layer 0, punch animation is on layer 10. Both animation blend modes are set to "Blend" (not additive).
I feel there needs to be a "Replace" blend mode, because the goal here is for the player to punch while running. However, the animation for the bottom half of the player should remain untouched since the punch animation does not affect the legs. The top half of the player should be a punch animation. I'm using CrossFade( "punch" ). However, while running and punching at the same time, the legs are affected for some reason and I don't know why. he appears to be sliding at some point.
How can I get this working properly? If this is an asset issue with the animation itself, how can I communicate to my artist that it is wrong? I have a hard time telling him exactly what he needs to do in maya/max to make this work. However, all this time I've been assuming its a Unity/script issue.
Here is some code:
void Awake()
{
animation["run"].layer = 0;
animation["run"].blendMode = AnimationBlendMode.Blend;
animation["punch01"].wrapMode = WrapMode.Once;
animation["punch01"].layer = 10;
animation["punch01"].blendMode = AnimationBlendMode.Blend;
animation.CrossFade( "run" ); // Assume that "run" is always playing
}
void BeginPunch()
{
animation.CrossFade( "punch01" );
}