From 9e5916d06c4850d503334f1bdb79a87b303998ff Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Fri, 3 Nov 2023 10:11:55 +0100 Subject: [PATCH] Head movements from gaze no longer not work when headanimation is disabled --- Runtime/HumanoidControl/Scripts/Movements/HeadMovements.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/HumanoidControl/Scripts/Movements/HeadMovements.cs b/Runtime/HumanoidControl/Scripts/Movements/HeadMovements.cs index 86461c8..1978b6b 100644 --- a/Runtime/HumanoidControl/Scripts/Movements/HeadMovements.cs +++ b/Runtime/HumanoidControl/Scripts/Movements/HeadMovements.cs @@ -27,13 +27,13 @@ namespace Passer.Humanoid { #if hFACE if (headTarget.neck.target.confidence.rotation < 0.2F && headTarget.head.target.confidence.rotation < 0.2F && - headTarget.face.leftEye.target.confidence.rotation > 0.2F) { + headTarget.face.leftEye.target.confidence.rotation > 0.2F && headTarget.headAnimator.headAnimation == true) { UpdateHeadBonesFromGazeDirection(headTarget); } else { #endif - if (Application.isPlaying && headTarget.humanoid.primaryTarget == HumanoidControl.PrimaryTarget.Hips) { + if (Application.isPlaying && headTarget.humanoid.primaryTarget == HumanoidControl.PrimaryTarget.Hips) { UpdateNeckRotation(headTarget); UpdateNeckPositionFromHips(headTarget); UpdateHeadPositionFromNeck(headTarget);