Rotation easy problem!

Hi guys! I want to rotate a cube on his center, just on x or y axis.
If you can i wanted to make it rotate with a “smooth”

How can I do it?

I’ll answer the second question first with a line of C#:

transform.rotation.x = Math.Lerp(transform.rotation.x, transform.rotation.x + 1, Time.deltaTime);

There are some other interpolation methods like Math.Slerp (Spherical Interpolation). They will behave in slightly different ways, but as I have no better information to go on, for infinite rotation like I am assuming is the intended behavior, the above code using Linear Interpolation will work just fine.

As for getting a single axis to rotate, the above code will do just that; make sure that the axis you want to rotate on is what is being fed to, and received from the Interpolation function. Getting multiple axes to rotate is a bit more interesting, but more or less the same general idea.