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
0
Question by davidcox70 · Jan 28, 2019 at 01:33 PM · animator controllerlateupdate

Rotate bone in LateUpdate not overriding animator?

I'm having a problem with scripted bone rotations not overriding the animator. My script is in LateUpdate. I am using 2018.3. The animation rig is "generic".


The script to rotate the bones on its own works fine. But as soon as I add a layer to the Animation Controller with an animation clip for the same bones, the script is overridden and so no longer controls the target bone. Even if the Animator layer weight is set to 0 and even if there is no connection to the state in the Animator that holds the clip. All "Write Defaults" are unticked.


What I want to be able to achieve is to hand over control of the bones from script to animator and back again using a transition. So just turning off the animator is not really a possibility.


Any reason why a script in LateUpdate is not overriding the animator? The object with the bones is also a RigidBody, in case that has anything to do with it.


Thanks :-)

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 SpaceManDan · Nov 05, 2019 at 01:53 AM 0
Share

I'm also having this issue. HELP!

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Bjolala · Jun 22, 2020 at 03:00 PM

I'm having the exact same issue! Did you find a solution?

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 Saiansh2525 · Jun 19, 2020 at 08:43 PM

@davidcox70 I think this is because the animation controller takes over the rotations of the bone. This is how it works when you are using ragdolls also:

https://www.youtube.com/watch?v=DInV-jHm9rk

The short answer would be that you can't change the rotation of a bone through script with the animator component controlling the head. This is because the bone is rotating then the animator component instantaneously changes the rotation. There is one method. You would have to create a new avatar asset contataining all the joints instead of the head. Then create a new layer in the animation controller that has that avatar applied. Now you need to create a duplicate of all the animations inside the main layer with all the parameters, transitions, blend trees, etc. applied. Now, whenever you want to animate the head through script then switch the layer to the new layer you created and it will continue the animations but instead with everything except for your head and you will have control over your head because the animation controller is moving everything in the avatar and that doesn't include the head. I have not verified this answer but I think it will work. Hope that helps!

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 Pietro3 · Apr 28 at 08:56 PM

I`ve just found a simpler solution. Just set the update mode to "Animate Physics" in the Animator component and the scripted rotations should update properly =)

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

101 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Are bone transforms in LateUpdate the transforms for the next or previous frame? 1 Answer

How do I set the color of a particle? Do I need LateUpdate? 0 Answers

How do I use an animated prop with a Humanoid rig. 1 Answer

Get length of animator state/transition? 2 Answers

switch animation from blend tree 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