Ejemplo n.º 1
0
 /// <summary>
 /// それぞれの顔パーツ情報を初期状態に戻します。
 /// </summary>
 /// <param name="calibration"></param>
 /// <param name="lerpFactor">0-1の範囲で指定される、基準位置に戻すのに使うLerpファクタ</param>
 public void LerpToDefault(CalibrationData calibration, float lerpFactor)
 {
     Outline.LerpToDefault(calibration, lerpFactor);
     for (int i = 0; i < PartsWithoutOutline.Length; i++)
     {
         PartsWithoutOutline[i].LerpToDefault(calibration, lerpFactor);
     }
 }
Ejemplo n.º 2
0
            public override void LerpToDefault(CalibrationData calibration, float lerpFactor)
            {
                CurrentFaceRollRad = Mathf.Lerp(CurrentFaceRollRad, 0, lerpFactor);
                CurrentFaceRollSin = Mathf.Sin(CurrentFaceRollSin);
                CurrentFaceRollCos = Mathf.Cos(CurrentFaceRollCos);
                CurrentFaceYawRate = Mathf.Lerp(CurrentFaceYawRate, 0, lerpFactor);

                float faceLen = Mathf.Sqrt(calibration.faceSize);

                FaceSize = Vector2.Lerp(FaceSize, new Vector2(faceLen, faceLen), lerpFactor);

                _headRollRad.OnNext(CurrentFaceRollRad);
                _headYawRate.OnNext(CurrentFaceYawRate);
            }
Ejemplo n.º 3
0
 public override void LerpToDefault(CalibrationData calibration, float lerpFactor)
 {
     //何もしない: そもそもプロパティとして外に出してない
 }
Ejemplo n.º 4
0
 public override void LerpToDefault(CalibrationData calibration, float lerpFactor)
 {
     CurrentEyeOpenValue = Mathf.Lerp(CurrentEyeOpenValue, calibration.eyeOpenHeight, lerpFactor);
     _eyeOpenValue.OnNext(CurrentEyeOpenValue);
 }
Ejemplo n.º 5
0
 public override void LerpToDefault(CalibrationData calibration, float lerpFactor)
 {
     CurrentNoseBaseHeightValue = Mathf.Lerp(CurrentNoseBaseHeightValue, calibration.noseHeight, lerpFactor);
     _noseBaseHeightValue.OnNext(CurrentNoseBaseHeightValue);
 }
Ejemplo n.º 6
0
 //NOTE: キャリブ情報には両眉の平均値が載っているので、リセット時は平均値を両方に当て込めばOK
 public override void LerpToDefault(CalibrationData calibration, float lerpFactor)
 {
     CurrentHeight = Mathf.Lerp(CurrentHeight, calibration.eyeBrowPosition, lerpFactor);
     _height.OnNext(CurrentHeight);
 }
Ejemplo n.º 7
0
 /// <summary> パーツの値を基準値まで戻す。このとき、必要ならばキャリブデータを参照してもよい。 </summary>
 public abstract void LerpToDefault(CalibrationData calibration, float lerpFactor);