diff --git a/Assets/VRM10/Runtime/Components/Expression/DefaultExpressionValidator.cs b/Assets/VRM10/Runtime/Components/Expression/DefaultExpressionValidator.cs index b671a16087..167bd6b256 100644 --- a/Assets/VRM10/Runtime/Components/Expression/DefaultExpressionValidator.cs +++ b/Assets/VRM10/Runtime/Components/Expression/DefaultExpressionValidator.cs @@ -69,21 +69,52 @@ public void Validate(IReadOnlyDictionary inputWeights, IDi var blinkMultiplier = 1f - blinkOverrideRate; var lookAtMultiplier = 1f - lookAtOverrideRate; var mouthMultiplier = 1f - mouthOverrideRate; + Debug.Log($"m{mouthMultiplier} b{blinkMultiplier} l{lookAtMultiplier}"); // 3. Set procedural key's weights. foreach (var key in _keys) { if (key.IsBlink) { - actualWeights[key] = actualWeights[key] * blinkMultiplier; + if (_expressions[key].IsBinary) + { + if (blinkMultiplier < 1.0f) + { + actualWeights[key] = 0.0f; + } + } + else + { + actualWeights[key] = actualWeights[key] * blinkMultiplier; + } } else if (key.IsLookAt) { - actualWeights[key] = actualWeights[key] * lookAtMultiplier; + if (_expressions[key].IsBinary) + { + if (lookAtMultiplier < 1.0f) + { + actualWeights[key] = 0.0f; + } + } + else + { + actualWeights[key] = actualWeights[key] * lookAtMultiplier; + } } else if (key.IsMouth) { - actualWeights[key] = actualWeights[key] * mouthMultiplier; + if (_expressions[key].IsBinary) + { + if (mouthMultiplier < 1.0f) + { + actualWeights[key] = 0.0f; + } + } + else + { + actualWeights[key] = actualWeights[key] * mouthMultiplier; + } } }