Why my camera is jittering?(Wheel colliders)

I have a big problem with camera follow , I tried all methods what I found on the internet in last 3 days , absolutely everything , but the problem is still the same.

(The camera is tracking the car)

Camera is jittering and makes small shakes.

Methods:

Change rigidbody interpolate
Change Updates from camera and car controller
Making another scripts
Changing colliders
Add Vector3.Lerp or Vector3.SmoothDamp
Changing wheelcolliders parameters
Reinstall unity
and we are still there.

Do you have any idea what’s going on?

Yes, wheel colliders are finicky! Their springs oscillate even when it appears the car is at rest.

If you have parented the camera to the car that can be major problem. Your best bet is to not directly parent the camera.

If you are not, you can also set up your code so the camera does not move unless the motion of the car crosses some threshold, and also ignore the y axis if you do not have any vertical height on your track.

Here is a camera script I created I have had good luck with - maybe you can too, and modify it to your needs. You can use it with a fixed offset or control it using the mouse - just choose the options in the inspector. Set up the initial camera position relative to the car in the scene before you run the game:

   using System.Collections;
   using System.Collections.Generic;
   using UnityEngine;

// streetwalkers's camera follower modification
public class CameraFollower : MonoBehaviour {

	[Header( "Target Parameters" )]
	public Transform target;
	public Vector3 offset;
	public float followSpeed = 2;
	public float lookSpeed = 3;
	public bool fixedCamera;
	public bool relativeCamera;

	private float distance;

	[Header( "Camera Rotation Speeds" )]
	public float y_sensitivity = 5f;
	public float x_sensitivity = 5f;



	// Other private variables
	private float pitch, yaw;
	private bool dragging = false;

	Vector3 c1Pos;
	Quaternion c1Rot;

	private void Start() {
		offset = transform.position - target.position;
		c1Pos = target.parent.position;
		c1Rot = target.localRotation;
	}

	void Update() {
		if( Input.GetMouseButtonDown( 2 ) ) {
			target.parent.position = c1Pos;
			target.localRotation = c1Rot;
			target.GetComponent<Rigidbody>().velocity = Vector3.zero;
		}

		transform.position = target.position + offset;
		if( Input.GetMouseButtonDown( 0 ) ) {
			dragging = true;
		}

		if( Input.GetMouseButtonUp( 0 ) ) {
			dragging = false;
		}

		pitch = 0;
		yaw = 0;
		if( Input.GetMouseButton( 0 ) && dragging ) {
			pitch = -Input.GetAxis( "Mouse Y" ) * y_sensitivity;
			yaw = Input.GetAxis( "Mouse X" ) * x_sensitivity;
		}


		float wheelDelta = Input.GetAxis( "Mouse ScrollWheel" );

		Zoom( wheelDelta );
		RotateAround();
	}

	private void FixedUpdate() {
		if( !relativeCamera ) {
			LookAtTarget();
			MoveToTarget();
		}
	}

	private void LookAtTarget() {
		Vector3 _lookDirection = target.position - transform.position;
		Quaternion _rot = Quaternion.LookRotation( _lookDirection, Vector3.up );
		transform.rotation = Quaternion.Lerp( transform.rotation, _rot, lookSpeed * Time.deltaTime );
	}

	private void MoveToTarget() {
		if( fixedCamera ) {
			transform.position = offset;
		} else {
			Vector3 _targetPos = new Vector3( target.position.x, 0, target.position.z ) +
							 target.forward * offset.z +
							 target.right * offset.x +
							 Vector3.up * offset.y;

			transform.position = Vector3.Lerp( transform.position, _targetPos, followSpeed * Time.deltaTime );
		}
	}

	private void Zoom( float wheelDelta ) {
		if( Mathf.Abs( wheelDelta ) > 0 ) {
			Vector3 direction = offset;
			distance = direction.magnitude;
			direction = direction.normalized;
			distance = distance - wheelDelta;
			offset = direction * distance;
		}
	}

	private bool RotateAround() {
		bool rotated = false;

		if( Mathf.Abs( pitch ) > 0 ) {
			offset = Quaternion.Euler( new Vector3( pitch, 0, 0 ) ) * offset;
			rotated = true;
		}

		if( Mathf.Abs( yaw ) > 0 ) {
			offset = Quaternion.Euler( new Vector3( 0, yaw, 0 ) ) * offset;
			rotated = true;
		}
		if( relativeCamera ) transform.LookAt( target );
		return rotated;
	}


	private float RotToDeg( float rot ) {
		float deg = 0;
		if( rot > 180f ) {
			deg = rot - 360f;
		} else {
			deg = rot;
		}
		return deg;
	}

}

note that in this script the target was the car body that was a child of a parent rigidbody that the wheels were also attached to, so you may need to modify the code so it targets the correct object in your scene.