Creating a UI Speedometer

Interested in this Tutorial?

Check out the about tab below and start learning on CG Cookie today.

Start Learning
Heya!

Login with your CG Cookie Citizen Account to ask a question.

Start Learning

Create a Digital Speedometer

This Unity tutorial will go over how to create and script a UI speedometer for our motorcycle. The motorcycle may look familiar as it was taken from the fantastic Blender course by Chris Kuhn found here: Modeling a Motorcycle. I wanted to bring this into Unity to add a digital speedometer modeled off some real world digital speedometers found in cars currently out there.

We'll use the UI system in Unity 4.6 to mimic a bar being filled to represent the speed increasing along with text elements to update our actual speed value in real time. C# will be used to control the increase and decrease in speed. It's fairly simple and straightforward but looks really cool and can be applied to a lot of different game mechanics.

By the end of this video you should know how to create this:

 

SpeedometerUnity

The source files include the motorcycle model along with the UI images you'll need and the completed C# script. The only thing you'll need to import yourself is the font file (if you want to follow along, it's not required). The font file is called Digital-7 and can be found here: http://www.dafont.com/digital-7.font

No questions found.

Level 5

Thumb
Rank: 27
Ever since I was young I've been fascinated with games and the way they work. Now I get to teach the amazing world of game development. I'm always learning and always willing to teach what I've picked up along the way. You can directly contact me here, through the message boards or even through my person site linked to the side.