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);
        }
    }
    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);
        }
    }
Example #3
0
 public void StartJitterEffect(float jitterStrength)
 {
     jitterStrength = EasyMotionUtility.ClampValueSymmetrically(jitterStrength, 10);
     isJittering    = true;
     jitterAmount   = jitterStrength;
 }