Merge branch 'master' of ooftooft.net:Racesm

This commit is contained in:
2024-04-11 14:31:33 +02:00
16 changed files with 2593 additions and 2993 deletions

View File

@@ -13,12 +13,16 @@ public class carcontrolv2 : MonoBehaviour
public float autoBrake;
WheelControl[] wheels;
Rigidbody rigidBody;
public Rigidbody rigidBody;
// Start is called before the first frame update
void Start()
{
rigidBody = GetComponent<Rigidbody>();
if (rigidBody == null)
{
rigidBody = GetComponent<Rigidbody> ();
}
// Find all child GameObjects that have the WheelControl script attached
wheels = GetComponentsInChildren<WheelControl>();