Many racing games will show the player's position relative to the level on a map, is there anyway to do this using unity's built in horizontal slider GUI element? So one end represents one position(I only want to measure the z axis), and the other end represents another, and the buttons position shows the player how close they are to the end of the level (the level is one way only, so perhaps the race track comparison was a bit off). Thanks
EDIT: I tried do to what yoyo suggested, but I get the error
"Assets/NewBehaviourScript.js(6,27): BCE0023: No appropriate version of 'UnityEngine.GUILayout.HorizontalSlider' for the argument list '(float, UnityEngine.Transform, UnityEngine.Transform)' was found."
How do I convert the player's position to a value?
You mean like this?
Since you do nothing with the return value (though letting the user drag themselves through the level with the slider might be an interesting cheat :-), the slider thumb will be effectively disabled from user control.
answered Jan 10 '11 at 04:26 AM