Head movements from gaze no longer not work when headanimation is disabled

This commit is contained in:
Pascal Serrarens 2023-11-03 10:11:55 +01:00
parent 3c853c3ba1
commit 9e5916d06c

View File

@ -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);