Jump to content
  • Advertisement
Sign in to follow this  
SlashOwnsU

Dude carrying a weapon

This topic is 4664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello ! I have a 3D model that does all sorts of things in my game, such as running, jumping, and whatever you can think of for now, he carries a sword, which is attached to him in the model file (it's a .md2) - the animations take care of the sword's movement now I'd like him to equip another weapon, thus keeping my character but changing the weapon in his hand and I'm wondering how I can achieve that I'm thinking about just having 2 different models, one for the dude, one for the weapon... then the weapon would just have its position relative to the character's hand... but it seems like a lot of work, managing the position of the weapon, it's rotation to apply according to the movement of the character, etc. is that the most suitable solution or are there better ones ?

Share this post


Link to post
Share on other sites
Advertisement
With MD2, you'd animate the weapon in the same space as the guy, so you just draw the two things at the same animation time, and it comes out looking fine.

For attaching guns, you'd probably rather want skeletal animation, where you can get the position of a specific joint ("right_wrist") and attach things to that.

Share this post


Link to post
Share on other sites
Pretty much every games use the second solution. Anchor point (relative position + relative orientation) on a joint / bone, each step of the animation, recompute the position/orientation of the gun.

The detaching/replacing/dropping the gun is straight forward.

Share this post


Link to post
Share on other sites
Quote:
Original post by oliii
Pretty much every games use the second solution. Anchor point (relative position + relative orientation) on a joint / bone, each step of the animation, recompute the position/orientation of the gun.

that's the kind of work I wanted to avoid...hehe
but I guess it's the best way of doing things
oh well lazy people don't get the best

thank you all

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!