using UnityEngine; namespace Normal.Realtime.Examples { public class VoiceMouthMove : MonoBehaviour { public SkinnedMeshRenderer[] skinned; private RealtimeAvatarVoice _voice; private float _mouthSize; void Awake() { _voice = GetComponent(); } void Update() { if (skinned != null) //not sure whether work or not { float targetMouthSize = Mathf.Lerp(0.1f, 1.0f, _voice.voiceVolume); _mouthSize = Mathf.Lerp(_mouthSize, targetMouthSize, 30.0f * Time.deltaTime); foreach (SkinnedMeshRenderer s in skinned)//not sure whether work or not { s.SetBlendShapeWeight(41, _mouthSize * 100); s.SetBlendShapeWeight(17, _mouthSize * 50); s.SetBlendShapeWeight(6, _mouthSize * 20); } } } } }
top of page

Vive facial tracking 脚本小错误更改

  • 作家相片: fang ma
    fang ma
  • 2022年2月12日
  • 讀畢需時 1 分鐘

已更新:2022年2月13日

脚本的table会串行,之前改过又忘了,


Table 脚本更改







相關文章

查看全部

Comments


  • Facebook
  • Twitter
  • LinkedIn

©2021 by Mianzi Ltd

bottom of page