using UnityEngine;
using System.Collections.Generic;
public class Rotations : MonoBehaviour
{
public List<Transform> wheels;
public Rigidbody rb;
public float forwardForce = 1000f;
public float sidewaysForce = 500f;
private void Start()
{
foreach (Transform wheel in wheels)
{
Vector3 wheelScale = wheel.localScale;
float radius = wheelScale.x / 2f;
Debug.Log("Wheel Radius: " + radius);
}
}
private void Update()
{
float horizontalInput = Input.GetAxis("Horizontal");
float verticalInput = Input.GetAxis("Vertical");
Vector3 forwardForceVector = transform.forward * verticalInput * forwardForce;
rb.AddForce(forwardForceVector);