public override void Start() { base.Start(); float finalMass = airplaneWeight * poundsToKilos; if (rb) { rb.mass = finalMass; if (centerOfGravity) { rb.centerOfMass = centerOfGravity.localPosition; } characteristics = GetComponent <IP_Airplane_Characteristics>(); if (characteristics) { characteristics.InitCharacteristics(rb, input); } } if (wheels != null) { if (wheels.Count > 0) { foreach (Ip_Airplane_Wheels wheel in wheels) { wheel.InitWheel(); } } } }
public override void Start() { GetPresetInfo(); base.Start(); float finalMass = airplaneWeight * poundsToKilos; if (rb) { rb.mass = finalMass; if (centerOfGravity) { rb.centerOfMass = centerOfGravity.localPosition; } charactistics = GetComponent <IP_Airplane_Characteristics>(); if (charactistics) { charactistics.InitCharacteristics(rb, input); } } if (wheels != null) { if (wheels.Count > 0) { foreach (IP_Airplane_Wheel wheel in wheels) { wheel.InitWheel(); } } } isGrounded = true; InvokeRepeating("CheckGrounded", 1f, 1f); }