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 /
avatar image
0
Question by MOrlando · May 17, 2012 at 10:12 PM · animationlayersblending

Animation Layers

Hello,

I've got 9 animations on layer 1 that I manually blend between for my enemy aiming at the player, each using the enemy's waist as a mixing transform. If I CrossFade, say, a full body turn animation that's on layer 0, it cancels my aiming animations. I have to re-enable them (via .enabled = true) to get them running again but only AFTER I call .Stop on the entire animation component (I can't even just call Stop( "TurnAnimationClip" ), it has to be a full .Stop() ).

Does anyone know why my blended animations stop running? There are many animations I'll need to play, such as a weapon reload or weapon fire. I don't want every possible animation canceling the aiming.

Thanks! -Matt

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 Bunny83 · May 17, 2012 at 10:59 PM 0
Share

Isn't that still the same problem as in your other question?

avatar image MOrlando · May 17, 2012 at 11:51 PM 0
Share

Yea I suppose it more or less is, huh. I didn't notice your edit actually, I'll test that first thing tomorrow, Bunny. I really appreciate you sharing that script, fantastic. :)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by rutter · May 17, 2012 at 10:32 PM

Check out the script reference: Animation.Stop() will stop all animations on all layers.

If it helps, Animation.Play() and Animation.CrossFade() take an optional parameter specifying whether they should stop or fade out all animations, or just the ones on the same layer. By default, both will operate on the one layer only.

Is there some reason you're calling Stop()? If your animations are layered, it seems like something you wouldn't have to do very often.

Comment
Add comment · Show 1 · 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 MOrlando · May 17, 2012 at 10:46 PM 0
Share

That's exactly my confusion, the animations on layer 1 seem to just stop when I play any animations on layer 0. The animations on layer 0 are "full body" and the blended animations are waist and up.

What happens is I play a transitional animation (like going from idle to alerted by the player). When that animation completes, I have to call .Stop() before I can play a full body "alert idle" and then the 9 blended animations.

I can't seem to get the additive animations working either (for instance, I'd like to play a 'Fire' animation that won't bring my blended ai$$anonymous$$g animations back to center before returning again). But that's another problem I suppose...

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

6 People are following this question.

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

Related Questions

Mecanim : use mask only in certain conditions 0 Answers

Chaining Animations Above Layer Zero 0 Answers

Freezing 1 Animation Layer while Another layer is still playing.... 2 Answers

Mecanim layers blending 0 Answers

addmixing Transform frustration. Would appreciate some guidance. 3 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