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 May 17, 2017 at 07:56 AM by JesHal for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by JesHal · Jan 22, 2013 at 03:39 PM · animationcharactermecanimweaponswitching

Switching weapons animation with mecanim?

Let's assume I have character with two weapons. One weapon is on his back and the one he is using is on his hand. Then I press key and my character should switch weapons with animation. Also this animation should only affect his upper body so legs can keep running or standing or whatever they were doing.

The question is can I achieve this with mecanim?

Comment
Add comment
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

2 Replies

  • Sort: 
avatar image
0
Best Answer

Answer by JesHal · Feb 06, 2013 at 09:30 PM

This can be achieved by using avatar body mask.

At the end of this tutorial Unity 4.0 - Mecanim Animation Tutorial you will find out how to use body masks.

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 Max_Bol · Jun 05, 2015 at 07:32 PM

Just an additional note (since this is one of the first link that appear on Google when searching for Unity Humanoid weapon).

To make "stick" the weapons to the hand and to the back while using the humanoid animation type would be to expose the related bones to which you want the weapons be hold to.

For example, the hand that hold the weapon's handle with the trigger should have its bone exposed (if you're using the Optimized Game Object option for humanoids) this will allow the GameObject to have only the exposed bones shown in its children. (A lot more simple than searching through all the bones children to find the right one.) You could also expose the Torso related bone. That way, through a series of simple scripts steps you could animate the body and change the parenting of the weapons based on wherever you want the weapon to be hold.

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

10 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

Related Questions

How to edit a Mecanim animation for your character? 1 Answer

Why do legacy & humanoid animations look different on the same character? 1 Answer

How do I replace parts of an animated character? 0 Answers

Facial Animation inconsistancy in Mecanim 0 Answers

Is there a Mecanim callback for, "Where X bone would be if IK was off"? 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