Quick Guide: Rotating Coin- Game Dev Series 94

Objective: create a collectable rotating coin.

In this quick guide, I will create a rotating coin as collectable bonus in game.

Create a collectable is not so difficult, we have done it before.
To make a collectable more unique, let’s make it spinning in the air.

The key point would only be one thing: find out the local value.

The axis direction would be different between local and global. To make an object rotate by itself, we will need to use the local value.

In this case, we should spin the coin on x-axis.
Open script and add one line in Update().

That would make your coin start spinning as mine. You can also control the spinning speed by using a float variable.

That would be the easiest way to make the gameobject rotating.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store