Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Is there a way to rotate single bones in a timeline with animation clips?

Discussion in 'Timeline' started by AtomicLugia, Jun 4, 2022.

  1. AtomicLugia

    AtomicLugia

    Joined:
    Aug 15, 2020
    Posts:
    54
    I want to have a character walking or standing and having it's head moving via bone rotation. I mean, I can use an Override Track with only the head as Avatar Mask but unfortunately, Clip Transform Offsets won't apply here. I could make an animation that makes the head rotate but this would be very umconfortable, since you have to create dozens of animations just for simple head rotations in any directions.

    So... Is there a way or workaround for this? My idea is to rotate bones, which is added as offset to the already playing animation. Something like this:
    Animation Clip: Idle
    Animation Override Clip: Waving Hands
    Added Bone Offset: Head

    I hope this makes sense and any help would be appreciated!
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Not sure if applicable to your situation, but what I did was add a component to the character to control what the eyes and head look at. I have settings such as "head turn strength" and "head turn speed" so the eyes can dart to look at something quickly, but the head turns slower (or not at all). When enabled, this component takes over the head rotation bones (and neck). I also add multiple target objects to look at, with weights per target object (so can slide from looking at character A to character B to something on the floor). Because its a separate component, the avatar masks are not relevant. By using a component like this, I can make the head and eyes track an object while the character is moving, even if the object being looked at is also moving.

    But I was not sure why you were mentioning Clip Transform Offsets, so I might be missing something. The above component, when enabled, basically takes over completely (due to using LateUpdate() from memory - its been a while since I wrote it)

    Here is an old version of the component if you want a look - not sure if I have changed it much since then. https://gist.github.com/alankent/132ce3698867dfeb0146451e0b77cd01
     
  3. AtomicLugia

    AtomicLugia

    Joined:
    Aug 15, 2020
    Posts:
    54
    Thanks but unfortunately, this didn't help at all. Is there really no way to have bone rotation in the timeline on top of the animation clip's bone rotation? There has to be a way to make this work, otherwise this may be one of the most unnecessarily complicated things I have ever seen on a software. Making a character's head rotate while an animation of the character's model on top of that shouldn't be this difficult in timelines.