Ejemplo n.º 1
0
 public void StopSpringForce()
 {
     if (available && SystemInfo.operatingSystemFamily == OperatingSystemFamily.Windows)
     {
         DirectInputWrapper.StopSpringForce(wheelIndex);
     }
 }
    private IEnumerator _InitSpringForce(int sat, int coeff)
    {
        yield return(new WaitForSeconds(1f));


        Debug.Log("stopping spring" + DirectInputWrapper.StopSpringForce(wheelIndex));
        yield return(new WaitForSeconds(1f));

        long res   = -1;
        int  tries = 0;

        while (res < 0)
        {
            res = DirectInputWrapper.PlaySpringForce(wheelIndex, 0, Mathf.RoundToInt(sat * FFBGain), Mathf.RoundToInt(coeff * FFBGain));
            Debug.Log("starting spring" + res);

            tries++;
            if (tries > 150)
            {
                Debug.Log("coudn't init spring force. aborting");
                break;
            }

            yield return(null);
        }
    }
 public void StopSpringForce()
 {
     Debug.Log("stopping spring" + DirectInputWrapper.StopSpringForce(wheelIndex));
     if (MasterSteeringWheel)
     {
         Debug.Log("stopping spring" + DirectInputWrapper.StopSpringForce(masterIndex));
     }
 }
 public void StopSpringForce()
 {
     Debug.Log("stopping spring" + DirectInputWrapper.StopSpringForce(wheelIndex));
 }