Preview:
private void WheelsAnimation()
    {
        for (int i = 0; i < wheelCollider.Length; i++)
        {
            Vector3 pos = new Vector3(0, 0, 0);
            Quaternion quat = new Quaternion();
            wheelCollider[i].GetWorldPose(out pos, out quat);

            // Update Wheel Prefabs rotation and position
            wheelPrefabs[i].transform.rotation = quat;
            wheelPrefabs[i].transform.position = pos;
        }
    }
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter