Hiya. I'm using the Yaw and Pitch Mecanim animation functions for turning heads. I set up a little additive animation blend tree for these and they work great.
However when I use the Stop Looking function these do not return completely to zero, meaning my character is always looking slightly down and to the side.
Image showing pitch and yaw not returning to zero
I am only using the standard face object actions with nothing else affecting the animation, and I am calling it from the start of the scene at the very start of the game.
I have a temporary workaround by setting small thresholds at the start for looking straight ahead, but this is not ideal as it causes the character to snap to facing forward if what they're looking at passes from left to right or vice versa.
Is there anything I can add to the scripts to ensure it snaps to true zero upon Stop looking without using the isInstant bool? Thanks!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
What are your AC and Unity versions?
If your character has a Humanoid rig, an alternative approach would be to enable IK head-turning in the character's Inspector - allowing for such animation to be automatic.
Recreated - thanks for the report, I'll have this addressed in the next release.
Ah perfect. Sorry for not getting back to you with the Unity version. Thanks for your help!