How to rotate car tires while it is moving on a path?

Hi…

I have a car moving along a path (super spline pro)…and like to make its tires rotate with a speed that would be affected by changing the path length (this can be controlled by changing path nodes positions)…

The car may move forward and backward.
I think “Wheel Collider” is responsible, but don’t know how to use it correctly…

Thanks in advance for any help…

Do math.

First, find the circumference of the wheel. Circumference = 2 * pi * radius

Each frame, calculate the distance traveled this frame (in Update function). Magnitude of the vector that points from the position during the previous frame to the position during this frame. Vector from A to B = B - A

Divide this distance by the circumference to find the fraction of a full rotation.

Multiply by 360 to convert to degrees.

Rotate wheel by that much.