O'Reilly logo

3D Graphics with XNA Game Studio 4.0 by Sean James

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Playing a skinned animation

In order to play a skinned animation, we need to, for each frame, find the transformations to be applied to each bone according to the current keyframe of the animation. The Effect will then take those transformations and use them to move the vertices of our model. We will use XNA's SkinnedEffect to perform the second function. However, to perform the first function of determining the current keyframe and determining what the bone transformations should be, we will create a new class—AnimationPlayer.

public class AnimationPlayer skinned animationAnimationPlayer class, creating{ SkinningData skinningData; // The currently playing clip, if there is one public AnimationClip CurrentClip { get; private set; } // Whether ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required