Here, we will make the dwarf nod his head, regardless of what else he is doing. In other words, we will mix the nod animation with all other animations that he does such that the nod animation affects only his head.
  • Add a new member variable:
AnimationController nod;
  • Load it in the LoadGraphicsContent method:
nod = new AnimationController(this, dwarfAnimator.Animations["nodHead"]);
  • Now, set the head to have a nod animation, and set the blend animation to null so it doesn't blend with any other animations
  • Add the following code at the end of the Update method:
    // Add this to the end of the update method
    BonePose head = dwarfAnimator.BonePoses["head"];
    head.CurrentController = nod;
    head.CurrentBlendController = null;
  • That's it!

Last edited Mar 7, 2007 at 8:49 PM by dastle, version 6

Comments

No comments yet.