コード例 #1
0
    void SeatRotation()
    {
        float roll          = easyMotion.platformRoll - easyMotion.GetPlatformCentre();
        float rotationLimit = 10.5f;
        float rotation      = roll / dataDampening;

        rotation = EasyMotionUtility.ClampValueSymmetrically(rotation, rotationLimit);
        if (!float.IsNaN(rotation))
        {
            seat.localEulerAngles = new Vector3(0, 0, rotation);
        }
    }
コード例 #2
0
    void SeatRotation()
    {
        float dataDampening = 10f;
        float rotationLimit = 9.5f;
        float pitch         = easyMotion.ReturnPitch() - easyMotion.seatPitchModifier - easyMotion.GetPlatformCentre();
        float rotation      = pitch / dataDampening;

        rotation = -rotation;
        rotation = EasyMotionUtility.ClampValueSymmetrically(rotation, rotationLimit);
        if (!float.IsNaN(rotation))
        {
            seat.localEulerAngles = new Vector3(0, 0, rotation);
        }
    }
コード例 #3
0
ファイル: EasyMotion.cs プロジェクト: ismaelflorit/easymotion
 public void StartJitterEffect(float jitterStrength)
 {
     jitterStrength = EasyMotionUtility.ClampValueSymmetrically(jitterStrength, 10);
     isJittering    = true;
     jitterAmount   = jitterStrength;
 }