示例#1
0
        protected void BlendshapeReceived(OSCMessage message)
        {
            int   index = 0;
            float value = 0;

            if (message.ToInt(out index) && message.ToFloat(out value))
            {
                if (index >= 0 && index < blendshapesCount)
                {
                    blendshapesGeometry.SetBlendShapeWeight(index, value * 100f);
                }
            }
        }
示例#2
0
        protected void BlendshapeReceived(OSCMessage message)
        {
            int   index = 0;
            float value = 0;

            if (message.ToInt(out index) && message.ToFloat(out value))
            {
                for (int i = 0; i < remappingData.Length; i++)
                {
                    if (remappingData[i].inputIndex == index)
                    {
                        blendshapesGeometry.SetBlendShapeWeight(i, value * (100f * remappingData[i].multiplier));
                    }
                }
            }
        }