Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Character looking, Multi-aim with neck and torso adjustment results in "inaccuracy".

Discussion in 'Animation Rigging' started by sacb0y, Nov 27, 2019.

  1. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    999
    I'm currently attempting to make a "Character looking" constraint setup for my character here. Which includes not only head looking but eye looking. This all works solid, but then i felt the neck and upper spine bone could use some mild rotation too to be more lifelike.

    This causes the look aiming to have some inaccuracies, how can i resolve this?

    Correct looking without neck and torso movement


    Incorrect or "Overshooting" looking with neck and torso movement. Note how the eyes aren't looking at the camera and instead looking past it.


    I have tried using both multi-rotation constraint and chain IK (The SpineTurn object) with the same results.

    Here's how my constraint setup looks.
    upload_2019-11-27_1-50-1.png

    To explain a bit the head is not directly using the aiming it is instead a damped track of a child empty object.
    upload_2019-11-27_1-51-19.png

    This is so the eyes follow faster than the head, and also for more realistic movement overall. there's no native damped setting for the aiming script alone it seems.

    The eyes simply aim at the target
    upload_2019-11-27_1-52-50.png

    The neck and spine bone with use chain IK or multi rotation like above with a reduced influence.

    If not for the over shooting of the eyes this would all be perfect.
     
  2. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    71
    Looks like a doubled offset due to incorrect constraint evaluation order ie. the eye aim constraint evaluates, then the spine evaluates, offsetting your eyes after they've been aimed at the camera. If you move the eye constraints beneath the spine constraints (in your rig hierarchy), the eye aim constraint will be evaluated after the spine and it should all work.
     
  3. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    999
    Oh wow i didn't know the order of objects was important :O

    That does seem to have fixed it! Awesome!

    EDIT: Wait i might be mistaken
     
    Last edited: Nov 27, 2019
  4. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    999
    Ok so the problem the order makes is if the spine movement is supposed to reference the head movement, if the spine movement is processed first it doesn't seem to read the head movement at all (even with chain IK).

    If i place the spine after the head but before the eyes it seems to work ok for the eyes but not the head.

    i'll dig into it more...
     
  5. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    999
    I decided to just make the neck and spine also aim constrains with reduced influence.
     
    NotaNaN and florianhanke like this.