I can only get the wheels on my car to spin or turn but not both.
the code I am using to spin them is:
public WheelCollider WC_FL;
public Transform Wheel_FL;
void Update()
{
Wheel_FL.Rotate(WC_FL.rpm * (360/60) * Time.deltaTime, 0, 0);
}
and turning them
Wheel_FL.localEulerAngles = new Vector3 (Wheel_FL.rotation.x, WC_FL.steerAngle, 0);
I have tried many things:
putting them both in one Rotate statement but the turning spins out of control
putting them both in loclaEulerAngles but the spinning doesn’t work correctly
and several other things as well
any thoughts on how to get the wheels to both spin and turn?