void Start()
    {
        StartCoroutine(GearChanging());

        // I see this in unity car sample script, i don't khow what is do this
        Wheel_Colliders [0].attachedRigidbody.centerOfMass = new Vector3(0, 0, 0);

        rigid = GetComponent <Rigidbody> ();

        // used to smoothing smooth follow camera movement behind vehicle
        rigid.interpolation = RigidbodyInterpolation.Interpolate;

        // Set center of mass to center of mass transform localposition
        rigid.centerOfMass = COM;

        audioCar = GetComponent <VehicleAudio2017> ();
    }
Exemplo n.º 2
0
 void Start()
 {
     manager           = GameObject.FindObjectOfType <DriftManager> ();
     vehicleController = GetComponentInParent <VehicleController2017> ();
     vehicleAudio      = GetComponentInParent <VehicleAudio2017> ();
 }