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