using System.Collections; using System.Collections.Generic; using UnityEngine; public class CarMonitor : MonoBehaviour { public List wheelColliders; // Use this for initialization void Start () { } // Update is called once per frame void Update () { foreach (WheelCollider wheels in wheelColliders) { wheels.GetComponentsInChildren()[1].localEulerAngles += new Vector3(wheels.rpm * 6 * Time.deltaTime, 0, 0); } } }