Ok So i making this simple platformer with a ball. So basically i have A pickup / Collectible that is a Coin. I want the coin till it gets collected by the ball to keep rotating around it axis . Also I know I could do this by adding a Animation but I would prefer doing it Via A C# Script. So please if anybody knows how then Tell me. Thanks

  • \$\begingroup\$ -1 "This question does not show any research effort" \$\endgroup\$ – Vaillancourt Mar 30 '16 at 12:50

If you are rotating around the x axis, you can use this code:

float speed =5f;
void Update () {
        transform.Rotate(Vector3.right *speed * Time.deltaTime);

Not the answer you're looking for? Browse other questions tagged or ask your own question.