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 Lockstep · Dec 31, 2012 at 03:24 PM · animationmecanimspeed

Mecanim animator. Set speed of a single clip.

Hi.

I've just started working with the mecanim animation system. I use it to animate my player character. It also has a run animation. The speed of my character changes during the game thus i want to adjust the speed of the run animation accordingly.

Unfortunately I haven't found out yet how to change the speed of a single clip during runtime. Using Animator.speed would change the speed of all my animation but I only want to affect my run animation. So bsaically I am looking for something like the old animationState.speed.

Thank you

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

3 Replies

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

Answer by Daelus · Jan 16, 2013 at 03:43 PM

The easiest way I've found is to create a blend tree containing the same clip multiple times. Each one will have a speed attribute in the blend tree, then you can use whatever parameter you want to switch smoothly between the two speeds.

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 Lockstep · Jan 16, 2013 at 06:34 PM 1
Share

Thanks alot. This workaround does the trick. It is worth mentioning, that the effective speed of the animation is not calculated lineary. Worst example: If I set the first threshold to 0 with animation speed 0 and the second to 5 with speed 5 the effective animation speed will be 0 as long as my parameter is below 5. The lower speed generally seems to have a greater impact on the effective speed than the higher. I've been many thresholds with a distance of 2 to dampen this effect. The result looks pretty acceptable. It would still be nice if we could controll the speed directly.

avatar image
-1

Answer by manjav · Jan 18, 2013 at 04:25 PM

Hi When you dragged animation in animator controller or create blend tree you can changed speed of your clip in inspector tab.

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 KarlKarl2000 · Feb 12, 2017 at 04:21 PM

Sorry to necro a thread. But in case others find this thread like me. Unity came up with a solution (finally) after a couple years.

https://forum.unity3d.com/threads/mecanim-change-animation-speed-of-specific-animation-or-layers.160395/page-2

sharing is caring

https://twitter.com/IndieNendoroid

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

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

11 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

Related Questions

mecanim animation runs at random speed on iOS 0 Answers

Mecanim - changing animation clip speed, through script? 4 Answers

Mecanim problem with setting speed 0 Answers

Automatically adjusting the speed of a walking animation to avoid foot-sliding? 1 Answer

Are mecanim blend trees linear? 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