Cant find a proper way to add weapons to a rig

Hello. So I am new to this. Am working on a project in unity while make 3d characters in maya. As far as I could google the proper way to export an animated character is to separately send skeleton, animations and meshes. Hence it all must be separate in hierarchy.

How to properly attach a group with weapons to an animated character if not by parenting. Because for me it only worked well when was parented to a joint what made weapons appear in skeleton in unity which seems wrong. 


Replies

  • MikeF
    Offline / Send Message
    MikeF polycounter lvl 15
    There's really no need to export all assets separately, you should just be able to export everything as an fbx. You might want to have separate files for animations, but unless this is required for a specific purpose i usually just keep it all together in one file.

    As for the weapon group, that should be exported separately then re-linked in unity as a prefab or at runtime through code. This way you have control over the weapons and character separately while still being able to animate them together in maya
  • Ruslana_Volichenko
  • Ruslana_Volichenko
    MikeF said:
    There's really no need to export all assets separately, you should just be able to export everything as an fbx. You might want to have separate files for animations, but unless this is required for a specific purpose i usually just keep it all together in one file.

    As for the weapon group, that should be exported separately then re-linked in unity as a prefab or at runtime through code. This way you have control over the weapons and character separately while still being able to animate them together in maya
    Interesting. Thank you for the answer!
  • RyanB
    Offline / Send Message
    RyanB Polycount Sponsor

    How to properly attach a group with weapons to an animated character if not by parenting. Because for me it only worked well when was parented to a joint what made weapons appear in skeleton in unity which seems wrong.
    You need an attachment point on your skeleton for weapons or anything your character will hold.  Create a joint and parent it to the palm of the hand.  You don't need to use it for skinning, it just needs to be there for parenting the weapon in Unity.

    Now, you import the skeleton in Unity.  You will use a script to make the weapon a child of the attachment joint. 

    Make sure all of your transforms on weapons are clean (0,0,0 0,0,0 1,1,1) or you will run into future problems.

    Having one giant FBX with everything in it is a huge pain in the ass. 

    If you use addressable assets, you can speed up your iteration time by not having to build when you update assets.
  • Ruslana_Volichenko
    RyanB said:

    How to properly attach a group with weapons to an animated character if not by parenting. Because for me it only worked well when was parented to a joint what made weapons appear in skeleton in unity which seems wrong.
    You need an attachment point on your skeleton for weapons or anything your character will hold.  Create a joint and parent it to the palm of the hand.  You don't need to use it for skinning, it just needs to be there for parenting the weapon in Unity.

    Now, you import the skeleton in Unity.  You will use a script to make the weapon a child of the attachment joint. 

    Make sure all of your transforms on weapons are clean (0,0,0 0,0,0 1,1,1) or you will run into future problems.

    Having one giant FBX with everything in it is a huge pain in the ass. 

    If you use addressable assets, you can speed up your iteration time by not having to build when you update assets.
    cool! Thank you)
Sign In or Register to comment.