Search Unity

Multi Aim and Multi Rotation Constraint look at issue.

Discussion in 'Animation Rigging' started by SpookyCat, Oct 13, 2020.

  1. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,764
    I have a Multi Aim constraint to control the head to look at a target. That works nicely. I wanted to add some movement to the body to go along with the head movement so added some Multi Rotation constraints to move the neck and spine but that breaks the look at and the head goes all over the place. Even if the weight is set to 0 on all the Rot Constraints the head goes crazy. If I disable the Multi Rot constraint objects the look at works fine again. I have tried with the look at part before the multi rot constraints and after neither works. Is there a suggested way to have the head look at a target and be able to have the neck and spine react to the head movement?
     
  2. Jebtor

    Jebtor

    Unity Technologies

    Joined:
    Apr 18, 2018
    Posts:
    115
    My guess would be that you are applying the constraints in the wrong order. If the aim constraint for the head is applied before the chest constraint, the aim will be incorrect. What happens here is that the head is set to look at the target, after which you rotate the chest with a constraint. Because the head is a child of the chest the head will also be rotated. This creates a feedback loop when the constraints are applied every frame. Please have a look at the package documentation to see how you can control the order of constraints.
     
  3. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,764
    I have tried different orders, nothing works. Not having a good time with this system in general have to say, tried 3 constraints and all of them break one another on a Mixamo rig, think I am just going to stick with the old IK system as that works correctly. This system seems like its very fragile and needs a fair bit more testing.
     
  4. SuperSmithBros

    SuperSmithBros

    Joined:
    Jul 15, 2019
    Posts:
    4
    Replying to an old post but I had the same problem and solved it.

    Its the order in the hierarchy that matters, not the order you're setting things in your script / update function. The object with the chest multi aim needs to be higher than the object with the neck multi aim.

    It seems it processes them in the order it finds the game objects.
     
    Gravesend likes this.