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

VR Research Control Panel

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

VR实验时常常需要一个实验者能随时控制Participants的控制器。

但我们希望build之后只有我们自己能在电脑上看到,而被测在VR眼镜里是看不到的,目前看到的比较简单的办法是用Unity旧版的UI制作方法OnGUI,大概的脚本在这里可以看看: https://docs.unity3d.com/Manual/gui-Basics.html

相關文章

查看全部
Inspector GUI

https://answers.unity.com/questions/814870/why-arent-public-variables-shown-in-the-inspector.html public variables shown in the Inspector...

 
 
 

Comentários


  • Facebook
  • Twitter
  • LinkedIn

©2021 by Mianzi Ltd

bottom of page