- Home /
How can i animate the speedometer, power etc on this picture
I recently started working with unity. i have created a simple game consisting of a vehicle moving in straight road which is predefined. i want to use the image for speedometer and other meters. i don't know how to animate and keep changing the digits. any suggestions or links to tutorials?
Answer by BeB_Wir3 · Apr 02, 2013 at 12:04 AM
you should work with GUI to create the Cockpit. with gui you can create strings displayed on your screen, and for the meters, backgroundimage, etc, you could use some guitextures. you can find info about gui's here:
overall gui - http://docs.unity3d.com/Documentation/ScriptReference/GUI.html
guitext - http://docs.unity3d.com/Documentation/ScriptReference/GUIText.html
guitexture - http://docs.unity3d.com/Documentation/ScriptReference/GUITexture.html
you can insert a GuiText and GuiTexture via GameObject>CreateOther>Guitext(ure). you can edit its content via script. if you want to display an INT into the GuiText, you have to make it a string first. this is easily be done by typing:
guiText.text = " " + 3;
or with a variable (hide the ):
guiText.text = " " + ;
hope this helps.
Answer by zBlanco · Apr 02, 2013 at 12:04 AM
Well, assuming that the blue rectangle around 150 is your pointer, then you could create a separate object, that has it's own material as the pointer. Then you could rotate the pointer around the center of the speedometer depending on the speed.
Your answer
Follow this Question
Related Questions
Rotate Sprite based on Car Velocity Non GUI 3D Speedometer 0 Answers
Animation doesn't work 1 Answer
trigger animation 2 Answers
Speedometer included to First Person Controller 1 Answer
League of legends-Dota Style moving and animating script 0 Answers