The Armor Games website will be down for maintenance on Monday 10/7/2024
starting at 10:00 AM Pacific time. We apologize for the inconvenience.

ForumsProgramming ForumGUI Speedometer

4 5670
Ps3dude10
offline
Ps3dude10
7 posts
Nomad

I need to make a speedometer that stays on top of everything. I also don't know how to make the bar move to show how fast you are going.
Like this picture below. I need to know how to make the red bar move.
http://www.1800pocketpc.com/blog/wp-content/uploads/2010/06/11.png

  • 4 Replies
master565
offline
master565
4,104 posts
Nomad

By building a mechanism that outputs different powers depending on how fast you are going (this could be measured by how many times the wheels rotate per minute, how much wind resistance there is, and maybe more). You might also be able to build one by having a satellite check your position once, check it again a few seconds later, and see what the distance is between them. I'm not sure if technology is powerful enough to do this method.

Ps3dude10
offline
Ps3dude10
7 posts
Nomad

I just want to know how to make the red bar move around the center point. I know how to make it move up, down, and side to side. But I don't know how to make it move with the thicker end staying in the center, and have the thinner end point to the different speeds. In the game learn to fly, they have a speedometer like what I want.

master565
offline
master565
4,104 posts
Nomad

I just want to know how to make the red bar move around the center point. I know how to make it move up, down, and side to side. But I don't know how to make it move with the thicker end staying in the center, and have the thinner end point to the different speeds. In the game learn to fly, they have a speedometer like what I want.


I don't know what you mean thick and thinner, but it sounds like you just want to rotate it and adjust it's width and height.
driejen
offline
driejen
486 posts
Nomad

Make sure the registration point of the red pointer is where the center of rotation should be (i.e. the centre of the meter). Then change the .rotation property of the pointer to according to what it is you are measuring (i.e. speed).

Find out what value the rotation should be when the measurement is 0(lets label this a) and the rotation when the measurement is at its maximum(m) and label this b. If the measurement is s, the equation for the rotation would therefore be; a + s/m*(b-a)

Showing 1-4 of 4