Putting gun in hands of model
-
- Posts: 48
- Joined: Tue Aug 31, 2010 6:27 am
Putting gun in hands of model
Assuming I've loaded a MD2 model and can animate it find, how to I get the gun model loaded and lined up with the model? I have a separate md2 and pcx file for the model and the skin. So after I get it imported in, how do I make sure they line up?
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
-
- Posts: 48
- Joined: Tue Aug 31, 2010 6:27 am
So I have to hope the gun that came along with this might be animated so it almost accidentally follows along in the model's hands? How did Quake2 do it anyways for player models? IIRC that was the only place where the weapon could change but I believe the player models would update based on the weapon in their hands.
Edit: I looked at the model in blender and it actually had a gun already. Yet when I load it up in Irrlicht it's invisible. Could that be an issue of needing a second material?
Edit: I looked at the model in blender and it actually had a gun already. Yet when I load it up in Irrlicht it's invisible. Could that be an issue of needing a second material?
-
- Posts: 47
- Joined: Mon Jan 10, 2011 8:01 pm
- Location: SoCal
My experience in Irrlicht with animated characters is virtually nonexistent. However, from what I gather, using a .b3d model format is considered the standard for irrlicht, and Blender already is capable of outputting .b3d models. The .b3d is capable of storing animations and all sorts of other goodies, so in my highly unqualified opinion, I would recommend using that.
From there, it's a simple case of parenting the weapon to either the hand or arm bone for your character and then animating from there. Panda3d requires you to 'expose' the bone in question first before you give it a child though, but I'm not sure if that is required in Irrlicht.
Hope this helps.
From there, it's a simple case of parenting the weapon to either the hand or arm bone for your character and then animating from there. Panda3d requires you to 'expose' the bone in question first before you give it a child though, but I'm not sure if that is required in Irrlicht.
Hope this helps.
At least MD3 attaches the weapons via a tag (named point). Not sure whether MD2 is the same, or if Irrlicht exposes this info.
http://www.misfitcode.com/misfitmodel3d ... .html#tags
http://www.misfitcode.com/misfitmodel3d ... .html#tags