Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8750239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:49:54+00:00 2026-06-13T12:49:54+00:00

I want to create an object that moves (like people are moving or elastic

  • 0

I want to create an object that moves (like people are moving or elastic springs), when moving, the shape of the object will be changed. And I do not know how to create a 3D model shape changes in XNA 4.0. Can you help me?? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:49:55+00:00Added an answer on June 13, 2026 at 12:49 pm

    I might be able to give you some beginner-to-beginner advice.

    I just learned how to make a model from this example and based on your quesiton I applied an additional scale transform to one of the bones to see if I could manipulate its size the same way I can its position, and it did work.

    So I’m implying the answer to your question may be that while a model’s vertex data remains constant you can make it change shape using Scale transforms.

    Here’s my model:

    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Content;
    using Microsoft.Xna.Framework.Graphics;
    
    namespace SimpleAnimation
    {
        public class Body
        {
            Model bodyModel;
            ModelBone headBone;
            ModelBone bodyBone;
            Matrix headTransform;
            Matrix bodyTransform;
            Matrix[] boneTransforms;
    
            public Body()
            {
                HeadScale = 1;
            }
    
            public void Load(ContentManager content)
            {
                // Load the tank model from the ContentManager.
                bodyModel = content.Load<Model>("body");
    
                // Look up shortcut references to the bones we are going to animate.
                headBone = bodyModel.Bones["head"];
                bodyBone = bodyModel.Bones["body"];
    
                // Store the original transform matrix for each animating bone.
                headTransform = headBone.Transform;
                bodyTransform = bodyBone.Transform;
    
                // Allocate the transform matrix array.
                boneTransforms = new Matrix[bodyModel.Bones.Count];
            }
    
            public void Draw(Matrix world, Matrix view, Matrix projection)
            {
                // Set the world matrix as the root transform of the model.
                bodyModel.Root.Transform = world;
    
                // Calculate matrices based on the current animation position.
                Matrix headRotation = Matrix.CreateRotationX(HeadRotation);
                Matrix headScale = Matrix.CreateScale(HeadScale);
                Matrix bodyRotation = Matrix.CreateRotationX(BodyRotation);
    
                // Apply matrices to the relevant bones.
                headBone.Transform = headScale * headRotation * headTransform;
                bodyBone.Transform = bodyRotation * bodyTransform;
    
                // Look up combined bone matrices for the entire model.
                bodyModel.CopyAbsoluteBoneTransformsTo(boneTransforms);
    
                // Draw the model.
                foreach (ModelMesh mesh in bodyModel.Meshes)
                {
                    foreach (BasicEffect effect in mesh.Effects)
                    {
                        effect.World = boneTransforms[mesh.ParentBone.Index];
                        effect.View = view;
                        effect.Projection = projection;
    
                        effect.EnableDefaultLighting();
                    }
    
                    mesh.Draw();
                }
            }
    
            public float HeadRotation { get; set; }
    
            public float HeadScale { get; set; }
    
            public float BodyRotation { get; set; }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an object with a non-enumerable property(a property that does not
I want to create a Map object that can lose value only if we
I want to create a global object that represents the current user in Code
My User object that I want to create and store in the datastore has
I want to create an object in python that is a collection of around
I want to create a Javascript class/object that allow me to have various method:
I want to create a background thread that's owned by an object. When that
I want to create a custom set that will automatically convert objects into a
I want to create a json object like: { name: Julia birthdate: xxxx movies:
I want to create object on the client side of aspx page. And i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.