Пример #1
0
        // Use this for initialization
        private void Start()
        {
            m_WheelMeshLocalRotations = new Quaternion[4];
            for (int i = 0; i < 4; i++)
            {
                m_WheelMeshLocalRotations[i] = m_WheelMeshes[i].transform.localRotation;
            }
            m_WheelColliders[0].attachedRigidbody.centerOfMass = m_CentreOfMassOffset;

            m_MaxHandbrakeTorque = float.MaxValue;

            m_carAudio      = GetComponent <CarAudio>();
            m_Rigidbody     = GetComponent <Rigidbody>();
            m_CurrentTorque = m_FullTorqueOverAllWheels - (m_TractionControl * m_FullTorqueOverAllWheels);
            lastSpeed       = CurrentSpeed;
        }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     carAudio = car.GetComponent <CarAudio>();
 }