动作融合代码

var shoulder : Transform; //比如上半身骨骼
//var shoulder01 : Transform; //比如下半身骨骼
function Start()
{
   animation.Play("walk");
   animation["jump"].layer = 10;

   animation["jump"].blendMode = AnimationBlendMode.Blend;
   animation["jump"].wrapMode = WrapMode.Once;
  
   animation["jump"].AddMixingTransform(shoulder);
   //animation["walk"].AddMixingTransform(shoulder01);
}
function Update()
{
 
 if (Input.GetKeyDown ("space"))
 {
   animation.CrossFade("jump");
 } 
}

posted @ 2010-12-15 17:23  softimagewht  阅读(375)  评论(0编辑  收藏  举报