# Problems when rotating object to animate in Unity

I am trying to create some animations for a car model in Unity and I have a problem with the rotation of the wheels

https://imgur.com/a/HcWxyob

Here I can set the rotation properly as the pivot point seems to be at the center like how I want it to be but

https://imgur.com/a/TUpXBDX

When I play the animation it rotates on some other pivot point outside of the center of the wheel and even the car

Would you know how to fix this? Sorry if this is a dumb question

Thanks!

• You could just use a script with a "Speed" variable, enable the script and control the speed variable in the animation. This way you can't go wrong about weird rotations around pivot points :) – Gabriele Vierti Dec 29 '18 at 10:37

In this case, the animation contains rotation in x axis. Just rotate the tire without altering the position in each keyframe. Since object position can be changed with Transform.Translate function in its implementation.