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.

--

--

--

A passionate gamer whose goal is to work in video game development.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

With my #Cocacola

Software engineering pricing and cost dilemma

WGU Launches the Open Skills Management Tool (OSMT) as an Open Source Project

Using interfaces in Go the right way

Disbursement Summary TDP 11.21.210

CS373 Spring 2021 Blog #7

The OLX People Contingency To Trim Cost & Own Data

Infrastructure Monitoring and Observability using Dynatrace — Part 1

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
S.J. Jason Liu

S.J. Jason Liu

A passionate gamer whose goal is to work in video game development.

More from Medium

Day 105: Working with Animation Events in Unity

Camera plugin for Unity

Creating An Advanced 2D Player Controller Without Any Unity Components! (Part 1)

How to Make the Camera Shake Using Impulse Listener Extensions in Cinemachines Virtual Cameras