Animation Rigging Multi-Aim Constraint Head Not Looking At Target

MY GOAL:
I'm trying to have my character look and follow the target with their head & chest. When the target is moved up, they should look up and so on.

CURRENT RESULTS:
Right now the player's head looks at the ground and is slightly angled to the left. Like this
7102837--846691--HeadTargetSetupXEnabled.PNG.jpgNow, as you can see I have the X in Constrained Axes enabled, if I disable it, it looks like it works. However, the player will not follow the target up/down. In this image below the target is up but the head stays looking forward. At least it doesn't bend and look at the ground so this is my temporary fix at the moment just to look left/right.7102837--846697--LookUp.PNG
7102837--846700--HeadTargetSetup.PNG.jpg
In the image above you can see the X is no longer enabled and it's just the Y enabled.

MY RESEARCH:
I set this up by following along the Brackey's tutorial (

) and this has been my result. I have rewatched it multiple times trying to see if there's something I'm doing incorrect. The model is a Humanoid model downloaded from the Unity Asset Store. The free character model came from this asset https://assetstore.unity.com/packages/tools/game-toolkits/third-person-controller-basic-locomotion-free-82048

I came across this forum https://discussions.unity.com/t/784039 but it seems like a very large work around just to get the head to look at a target. I would take this route if I planned on doing more with this; however, to be honest I plan on snapping my target to an enemy for when the player "locks on" to an enemy. Other than that, this won't be used.

Also, I have reviewed the Unity Documentation. I did also try and change the Aim Axis from Y to every other option. Image below has X set to the Aim Axis, I've also tried -X axis as well and it can get to "look" right if I mess around with the offset values but does not function correclty. When you move the Target left/right it will work; however, it will not look up/down still even with X enabled. I have also enabled Z on Constrained Axis and that does not work either. I thought perhaps it was my model, so I imported a model from Mixamo and received the exact same results. Could this be a result of the animations I'm using?? Here's a link to the one's I'm using here
7102837--846709--upload_2021-5-3_10-49-30.png

When I changed models, I did start this entire setup process all over including doing the Bone Renderer Setup and Rig Setup. The only thing I wonder is if the Animation you're using could mess with this process.

EDIT: In one of my screenshots the bone is highlighted and it looks like the multi-aim constraint is attached to the bone but it's not. The Target, HeadRot, & ChestRot are all separate GameObjects and the multi-aim constraint is on the HeadRot & Chest rot, not on any of the bones.

I know your pain.
I am experiencing this strange failure also.
What I have noticed is the Unity demos work because they use plain gameobjects.
My FBX are a total mess in this process.
My next attempt is to extract the biped from the model to plain gameobjects and work from there.
The break seams to be in complex models. I have just spent 2 months with FinalIk and Unity Anim.
I spent the last year with FBXs and Blender Rigify / Rigify to Unity but the process broke things along the way.
I am hoping the next extraction will clear things up.
Unity's GO models works great in the animation timeline.
To be honest I dont want anims, just ability to IK pose.
My question to you and others is there a good FBX splitter into Unity process or asset?
I hope what I have offered here helps.

Don't put your components on your actual bones, it is much better to create new empty transforms as a sibling of your bone hierarchy and build your rigs with that. Not only will that give you a clearer overview of where you're modifying things, but it will also allow you control the order of operations of your constraints and such. This might already be the source of your problem, since your Multi-Aim Constraint might be executed and then overridden by something else.
I've been working on something similar to what you want and got it (mostly) working with this workflow.

Looking at the rest of your setup, if the move gizmo in your screenshot lines up to your bone axis (so you've turned on local gimbal drawing instead of global) then your aim axis should be Z.

2 Likes

[quote=“Yandalf”, post:3, topic: 839418]
Don’t put your components on your actual bones, it is much better to create new empty transforms as a sibling of your bone hierarchy and build your rigs with that. Not only will that give you a clearer overview of where you’re modifying things, but it will also allow you control the order of operations of your constraints and such. This might already be the source of your problem, since your Multi-Aim Constraint might be executed and then overridden by something else.
I’ve been working on something similar to what you want and got it (mostly) working with this workflow.

Looking at the rest of your setup, if the move gizmo in your screenshot lines up to your bone axis (so you’ve turned on local gimbal drawing instead of global) then your aim axis should be Z.
[/quote]

I’m sorry I should have mentioned this in my original post, the inspector window is locked while the bone is highlighted so I could show off my settings and what the bone looks like in scene view highlighted. My Target, HeadRot, & ChestRot are all seperate gameobjects. The multi-aim constraint is on the ChestRot & HeadRot gameobject while the Target gameobject is an empty gameobject with the Animation Rigging gizmo setup exactly how Brackey’s set his up. I’ll add this info into my original post so other’s will know as well. Thank you!

1 Like

[quote=“Yandalf”, post:3, topic: 839418]
Don’t put your components on your actual bones, it is much better to create new empty transforms as a sibling of your bone hierarchy and build your rigs with that. Not only will that give you a clearer overview of where you’re modifying things, but it will also allow you control the order of operations of your constraints and such. This might already be the source of your problem, since your Multi-Aim Constraint might be executed and then overridden by something else.
I’ve been working on something similar to what you want and got it (mostly) working with this workflow.

Looking at the rest of your setup, if the move gizmo in your screenshot lines up to your bone axis (so you’ve turned on local gimbal drawing instead of global) then your aim axis should be Z.
[/quote]

@Yandalf You have achieved ‘Golden Child of Wisdom Award’!
This little trick alleviates a lot of errors

1 Like

Did you find the solution to you problem?


Sorry for a delayed response but sadly no. This is mainly due to after working on my project my HDD crashed and I had to restart the project from scratch. I didn't use any source control services because it was only me working on it but don't plan on making that same mistake twice. If I get it solved this time around, I will be sure to update this post!

I know this is a months old post, but I will leave a comment here, as I've struggled with that problem recently and was searching for some possible solutions and this thread at least helped me to understand one part of the problem.

  • The first thing that helped me was the wrong Aim Axis, as @Yandalf pointed, just changing to the correct axis fixed the "ground staring" problem.
  • The second problem is the character weird rotation while looking around. I've found that Animation Rigging was using the bones orientation as default and those were rotated at creation, so I need to account for those values in the offset section.

The final result is not perfect, but almost what I wanted:

8072648--1043336--bone_rotation.png 8072648--1043339--parameters.png

8072648--1043351--anim-rigging-test.gif

2 Likes

[quote=“giantkilleroverunity3d”, post:5, topic: 839418]
@Yandalf You have achieved ‘Golden Child of Wisdom Award’!
This little trick alleviates a lot of errors
[/quote]

This solved my problem too, I just added a gameobject to the model connected to my neck object and re-attached the head to my new game object instead, and set the constraint on this new ‘object’ inbetween the neck and head.