Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jan 17, 2015 at 11:47 PM by KazeEnji for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by KazeEnji · Aug 05, 2013 at 02:02 PM · importpipelinecustomizationweaponsmultiple objects

Best pipeline to import multiple weapons into Unity for characters?

Hey Everyone,

I'm building an RPG right now and I'm having some trouble determining the best way to import and attach all these weapons to a character. For instance, I have a knight and let's say this knight will be able to choose from 5 swords. My original thought was to have the swords all in different maya files and import them seperately. Then instantiate the different swords depending on what the player has decided to purchase as a child of the "hand".

My artist tells me there's a problem with this though because of how the character was rigged in maya. If we do it the way I was thinking, we would have to import two separate bone structures and find a way to merge the two onto a single character. The alternative he presented was to actually import every weapon the character MIGHT use all at once in the single maya file and then programatically hide/unhide the meshes as the character changes them. This would allow for a single bone structure and no need to break anything. Which might be fine if you only had 5 weapons. But for an entire game where the player can possibly switch jobs; say you have 10 jobs and a menial 10 weapons per job. That's 100 weapons total at least and you have to load all 100 at once? Even hiding all non-active weapons, that still sounds like a nightmare to manage and a huge unnecessary strain on the computer.

So, my question boils down to this. What would you recommend as the pipeline to import customized weapons into the game so that it's effecient but also doesn't produce a ton of overhead to prep for?

Thank you for your help, -Tim-

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Owen-Reynolds · Aug 05, 2013 at 02:10 PM 0
Share

"...how the character was rigged...": does each weapon have its own bone, so a cutlass swings much more than a dirk?

I think a typical $$anonymous$$$$anonymous$$O has just animations for swinging a small, medium and huge weapon. Then you can mix&match weapons to characters. Can even bring in weapons not made with that character in $$anonymous$$d.

avatar image KazeEnji · Aug 05, 2013 at 05:15 PM 0
Share

Yes, I think my animator has rigged the weapon onto the model. So you're saying model the character without the sword then model the sword separately. Animate a generic attack then import them separately into unity. At which point, realign the weapon to the hand as a child so it swings with the original animation?

2 Replies

  • Sort: 
avatar image
0
Best Answer

Answer by Owen-Reynolds · Aug 05, 2013 at 06:01 PM

Restating from the comment:

Typically, you'd have the hand bone double as the generic weapon bone. In Unity, child an empty to the hand bone, placed where the weapon is gripped, and aimed/rotated with +Z along the shaft. To add any model as a weapon, child it to that empty, localPosition and localRotation 000 (or child to the hand, copying the empty's localPosition/rotation.)

The weapons might need to be childed to their own "positioning" empties. That would allow you to set the weapon 000 exactly where it should be gripped. So positioning the weapon in the hand is a "match tab A with tab B" thing.

The tricks works if you don't have a hand bone. Just child the "weaponGoesHere" empty to the forearm (and still where the hand is.)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by KazeEnji · Aug 05, 2013 at 07:27 PM

Gotchya. Yeah, I've used a positioning setup similar to that in the past. So as long as the weapon is a child of the empty gameobject on the hand in Unity, it should be aligned and move just like the animation has it.

Thanks, -Tim-

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Custom mipmaps with texture import settings 0 Answers

How to import "customizable" rig with multiple meshes from Blender to Unity? 0 Answers

Should I make an animator for each weapon or a master animator with all the weapons in it and call them respectively? 0 Answers

Proper approach to updating assets 1 Answer

Creating a model with different costumes in blender 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges