calculate speed

hi i just simply want to calculate the speed of an object, im sure theres an easy way of doing this but i just cant think straight today.
basicaly i have a bike and i want to measure how fast it is going on land so if its in the air the speed wiil only work if i press a button i can do that bit my self its just getting the speed to be accurate to the bikes position, if u know what i mean.

i am using torque on my bike and changing its max velocity through script

so any suggestions let me know im going to try a few things but theres probably a simpler way to do it…

Hi!
Have you checked out this answers?

http://unity3d.qatohost.com/questions/38429/how-can-i-calculate-velocity-without-using-rigidbo.html

http://unity3d.qatohost.com/questions/13256/get-current-speed-of-an-object.html

Hi … What i understand your question is you just need to find the speed of your bike at any time,If is it so , then you can get the speed through rigidbody.velocity and you can set it according to your button press and any functionality

For more accuracy maybe you should put the line in a FixedUpdate function as you’re toying with rigidbodies and physic.

My two cents.