Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 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 /
avatar image
3
Question by uberdood12 · Sep 10, 2011 at 03:06 AM · animationblendbodylimbs

Way to play two animations at once?

I was wondering if there is a way to play two animation at once. One animation on the upperbody and one animation on the lowerbody. Something like "Fire" on the upper body and "walk" on the lower body. So the legs still walk while the gun is shooting.

Thanks for any insight on this.

Comment
Add comment · Show 1
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 saud_ahmed020 · Mar 30, 2015 at 01:16 PM 0
Share

Thanks for it. This worthy question and given answers made my day.

Cheers

6 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by GuyFawkes · Sep 10, 2011 at 04:01 AM

I actually asked the same question a while back, so all of the information I'm posting here is from that question (http://answers.unity3d.com/questions/160848/how-do-i-run-two-animations-at-once-on-the-same-ga.html)

You're going to want to use Animation.Blend. Here's an example of blending: animation.Play("walk"); animation["wave"].layer=1; animation.Play("wave"); animation["wave"].weight=0.4f;

I just wanted to add again, all credit goes here.

Comment
Add comment · Show 4 · 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 uberdood12 · Sep 10, 2011 at 11:36 AM 0
Share

Thanks that you guys have been a great help!

avatar image GuyFawkes · Sep 10, 2011 at 01:12 PM 0
Share

No problem. Did the script work for you?

avatar image uberdood12 · Sep 10, 2011 at 08:10 PM 0
Share

Yes it did, with a little tweaking, thanks!

avatar image geobaby · Feb 03, 2016 at 12:39 PM 0
Share

Do you know how to do the same using Animator component?

avatar image
3

Answer by PrimeDerektive · Sep 10, 2011 at 03:13 AM

You can add a mixing transform bone to the animation through script, which will make the animation only effect that bone's transform and all children of that bone.

(So for example, for an upper body shooting animation, you would add the upper torso bone that has all the other upper body bones as children of it, usually spine1 or spine2 or whatever). Like:

var torsoBone : Transform; //drag the bone here in the inspector

function Start(){ animation["shoot"].AddMixingTransform(torsoBone); }

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
1

Answer by Max_power1965 · Jun 29, 2016 at 08:06 PM

Hi guys. Here a very step by step tutorial that explain how to play two animations at once: http://gamedevelopertips.com/unity-run-2-animations/

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
1

Answer by keroles-M · Jul 09, 2019 at 04:32 AM

You have to use layers: http://docs.unity3d.com/Manual/AnimationLayers.html

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
-2

Answer by DaveA · Sep 10, 2011 at 03:11 AM

Yes, why not?

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
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

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

Animation.Blend with Animator? 0 Answers

Can the animation editor create local rotational data? 3 Answers

Blending just the arms animation 1 Answer

Adding animation clips via script 2 Answers

Animation blending/crossfading sword help 2 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