Sign in to follow this  

Dude carrying a weapon

This topic is 4356 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
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

This topic is 4356 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this