- Home /
Constrain object to bone/joint in Unity
I'm currenty making an animation for a character swinging a sword in Maya. Currently the sword is just constrained to the hand bone/joint. I plan to export the character and sword as separate meshes to Unity. How should I export the model/rig from Maya, so that I can constrain the sword to the Hand bone/joint in Unity? Is this possible, and what is the standard practice for things like this? Thanks!
Answer by Kona · Mar 09, 2011 at 10:42 PM
You can add the sword and character separately to the scene and then in the inspector move the sword to be a child of your hand bone. So the hierarchy would look something like: Shoulder>UperArm>LowerArm>Hand>(Sword Object)
Also if you would like to have different weapons you could instead put an empty gameobject as child of the hand bone and use that as a reference to where to spawn your weapons/items.