Help with tank vehicle physics (WheelFrictionCurve, grip, torque, speed, acceleration)

Hello, I’m a complete noob on Unity and I’m trying to make a simple tank to begin with.

I managed to make a script to make the wheels work and be animated and such. Since its a tank the speed must be limited, but the grip and torque must be high.

With the simple controls of the tutorials I found around I must increase “Acceleration” to give the tank more torque, but it also makes it very fast, and the grip is nowere around to be modified.

I found te official documentation about the WheelFrictionCurve thing, and I implemented it in my code.

It works because playing with the parameters has an effect to how the tank drives, BUT if I set the values as the official doc says they are the default, the tank just bounces to infinity the same second it touches the ground, and if I tune the parameters so it does not bounce to infinity, the grip is waaaay lower than before implementing the curve and makes it undrivable.

I really dont understand what is wrong, by default im manually creating the same curve that Unity uses by default if I don’t specify otherwise, but it does not behave like it.

My code

Im creating the curves wrong?
Is there a different way to make it so the vehicle has a lot of torque, a lot of grip, but slow acceleration and top speed?

Thanks in advance for checking this!

if you are using a rigidbody you should be able to check the velocity of you tank and if it is greater than your max velo then set the velo to the max velo this should fix the one problem
as for the grip you could use physics materials.
however if you not using a rigidbody idk.
if the tank is accelerating to quickly with the required Acceleration to move the tank then simply set a float that when you are pressing the gas slowly increases toward the max velo then use this value to check the velocity of you tank and if it is greater than this value then set the velo to this value.
you might also want to set this value to the tanks velo if the player is not trying to Accelerate so as to make so when the player tries to accelerate again then start smoothly from their tanks current speed;
hope this helps.

as for the curve stuff i know nothing about it.

Vector3 flatVel = new Vector3(rb.velocity.x, 0f, rb.velocity.z);
if (flatVel.magnitude > maxMoveSpeed)
{
Vector3 limitedVel = flatVel.normalized * maxMoveSpeed;
rb.velocity = new Vector3(limitedVel.x, rb.velocity.y, limitedVel.z);
}