How do I get the rotation of the wheel in wheelcollider and apply it to another object?

Hi,

I made an animation and part of this animation is a wheel mesh, I want to rotate this wheel mesh so that it matches the rotation of a wheelcollider but I dont want to clone every rotation of the collider, I only want to have the rotation around the wheecolliders local Z axis so that I can apply this rotation to my Mesh.

Imagine it like this: If you look at the wheel collider from the side and the wheels up vector in the wheelcollider points at 3 o’clock then my meshs up vector should also point at 3 o’cock. Basically, my meshs up vector should point in the same direction as the wheels up vector.

I used rotate() to give my mesh a fixed rotation speed, it works and with checking the speed of my object I could calculate the meshs rotation speed but I dont think thats a good solution because I dont fully understand how to do that and Im just doing try and error coding.

Maybe Im just having the wrong ideas, can anybody give me a hint or help me?

Greetings
Johhny

Just in case someone has the same question - I just found out that this works:

yourMesh.Rotate(wheelCollider.rpm / 60 * 360 * Time.deltaTime, 0, 0);

I have no Idea why.