Attaching a weapon..

Jul 26, 2008 at 5:22 AM
 Is it possible to attach a weapon to a specific bone? I've been looking through the code, and I have yet to find a function that lets you choose a specific bone, and get things like position, or rotation from it, so I am wondering if this is a function already implemented that I am not seeing - Or if there is another way to do it.

 Thank you to anyone that helps,

- Piers
Coordinator
Jul 26, 2008 at 3:46 PM
Hi. It's possible to do that but there's no method like AttachItem that you can call. Instead, when you update the model you need to pass the transformation of the object that you want it to be attached as its parent matrix.

Example:  myWeapon.Update(elapsedTime, PlayerHandMatrix);
And you can get this matrix from the animation controller. I will try to make a sample about that soon.
Apr 1, 2009 at 5:25 AM
could you give us a better tutorial ?
Apr 12, 2009 at 2:33 AM
I got this working a little while ago - however I put the answer in a different discussion.

Pardon the redirect:
http://xnanimation.codeplex.com/Thread/View.aspx?ThreadId=34626
Apr 16, 2009 at 9:24 PM
everything it's not so clear..
could you post a serious tutorial  :(
in all part of these post many class do not match with code...