1 Replies - 4575 Views - Last Post: 28 December 2012 - 07:09 AM

#1 Xaosthetic  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-December 12

XNA - how to move skinned model-and merge animations

Posted 27 December 2012 - 12:28 PM

I've wrote some code for my game and made 3D model with animation. Because XNA 4.0 doesn't support .fbx with multiple animations I've generated 3 model files with different animations:
1. Start animation ( when you press arrow for the first time)
2. walk animation ( when you still hold it)
3. end animation ( when button is up)

And here comes my question. How to apply those 3 models to work with arrows. Now I'm using to render animations skinned_model_sample

protected override void LoadContent()
    {
        // Load the model.
        currentModel = Content.Load<Model>("end_R");

        // Look up our custom skinning information.
        SkinningData skinningData = currentModel.Tag as SkinningData;

        if (skinningData == null)
            throw new InvalidOperationException
                ("This model does not contain a SkinningData tag.");

        // Create an animation player, and start decoding an animation clip.
        animationPlayer = new AnimationPlayer(skinningData);

        AnimationClip clip = skinningData.AnimationClips["end_R"];

        animationPlayer.StartClip(clip);
    }


file with model and animation names are identical.

I have also second question :)/>/> How to get model position from or how to move this model? Now it's connected with camera coordinates but I'd rather prefer the model to have it's own coordinates and transform it independently from camera.

Is This A Good Question/Topic? 0
  • +

Replies To: XNA - how to move skinned model-and merge animations

#2 Xaosthetic  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-December 12

Re: XNA - how to move skinned model-and merge animations

Posted 28 December 2012 - 07:09 AM

Some part of my problem resolved. I've found out about XNA 4.0 Refres which supports multiple clips from one model. Still I don't know how can I get coordinates from my model and move it along the world or change animations smoothly in runtime.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1