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
1
Question by GeraldOBBI · May 10, 2012 at 10:07 PM · animationanimationsanimationclipanimateadditive

Addititive Animation Not Responding to Speed

Hello there,

I'm running into an issue with setting the speed of an additive animation. Each of the vehicles use a number of different additive animations which are modulated by our physics implementation. We have additive animations for each wheel and for each physical component such as:

  • RPM - modulated by setting speed (+1 is 1 RPM forwards, -1 is 1RPM backwards. Can get set to any value theoretically). Sets speed property on the AnimationState, wrapmode is set to loop and "loop" is set to true.

  • Suspension - modulated from 0-1, sets normalized time property on the AnimationState, wrampode set to clampforever and "loop" is set to false

  • Steering - modulated from -1 to +1, sets normalized time property on the AnimationState, wrapmode is set to clampforever and "loop" is set to false

This approach has worked for us when applied to vehicles with four wheels. However, once we extended it to vehicles with six wheels the middle wheel's rotation animation speed became uncontrollable. Once the animation's speed is set, its playback speed will modulate from some arbitrary value to another.

What this looks like is that as the vehicle is travelling, the four other wheels (both front and both rear) rotate at the correct speed whereas the middle speeds start at a stop, increase speed, stop, and begin reversing; repeating the pattern forever. This uncontrolled playback continues even after the vehicle has stopped and all speeds for the animations have been set to 0.

While debugging I've looked at the values for each of the animation states both before and after the speed is set and have validated that the values exactly match those being sent by our physics layer and that our physics layer is producing the correct values.

I have also validated that each of the animations run individually by using the gameObject.SampleAnimation() method as described in Unity Docs along with a custom editor which I've written.

This behaviour with our additive animations isn't confined to just the mid-wheels spinning however, this is the most clear cut case which I can explain. I've exhausted all of my debugging knowledge and am looking to the community to help, please!

Thanks! Gerald

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 Bunny83 · May 10, 2012 at 10:20 PM 0
Share
  • For a good and well described question.

1 Reply

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

Answer by Bunny83 · May 10, 2012 at 10:19 PM

Are you sure that the middle wheels have a normal animation (which propably hold them in position) running? Additive animations, as the name said, will be added to the result of the normal animations. If there's no other animation setting the wheels rotation to a basic level, each additive animation step (frame by frame) will be accumulated. If you just want to split animations to sub groups / bones, you can use a layered animations and use a MixingTransform.

Additive animations are ment to "blend it over" an existing animation. The docs example is a run animation + an additive lean animation. So the run animation controls the full body, but the lean animation is added afterwards.

Comment
Add comment · Show 2 · 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 GeraldOBBI · May 10, 2012 at 10:48 PM 0
Share
  • for re$$anonymous$$ding me to check source assets!

avatar image GeraldOBBI · May 10, 2012 at 10:51 PM 0
Share

Sorry, I should have made that clear in my initial post but yes we have a default "identity" pose animation which we loop over and over. These additive animations play on top of this animation however, it appears that the latest export of the model & animations didn't include the bones which control the rotation of the wheel. D'oh!

Once I had the artist re-export the model the problem completely disappeared. Let this be a lesson to everyone that you must ensure all bones are part of a looped animation when you are using additive animations!

Next time I'll be harder on the artists and ensure that all bones are part of the identity pose :)

Thanks!

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Can't Play Animation Clip When More Than One Clip Is Added To Animation 1 Answer

Animation not looping 1 Answer

Why i can't play animation clip i did ? Tried anything so far. 1 Answer

Mirroring animation clip without mirroring root motion node? 0 Answers

Unity Animations wont stop looping 1 Answer


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