Finally, good input

This commit is contained in:
SDraw 2023-01-30 19:52:08 +03:00
parent d8c79ed15c
commit d48944a039
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
7 changed files with 102 additions and 77 deletions

View file

@ -106,7 +106,7 @@ namespace ml_dht
if(m_avatarDescriptor != null)
m_avatarDescriptor.useVisemeLipsync = false;
float l_weight = Mathf.Clamp(Mathf.InverseLerp(0.25f, 1f, Mathf.Abs(m_mouthShapes.y)), 0f, 1f) * 100f;
float l_weight = Mathf.Clamp01(Mathf.InverseLerp(0.25f, 1f, Mathf.Abs(m_mouthShapes.y))) * 100f;
p_component.BlendShapeValues[(int)LipShape_v2.Jaw_Open] = m_mouthShapes.x * 100f;
p_component.BlendShapeValues[(int)LipShape_v2.Mouth_Pout] = ((m_mouthShapes.y > 0f) ? l_weight : 0f);