progress bar How could you create a progress bar that takes the distance between one object and another that when the player is approaching a certain object, the bar is filled
I guess the first step is to figure out the distance between the player and the object. This may do: Code (CSharp): float distance = Vector3.Distance(player.transform.position, object.transform.position); If it's in the Update () method it will be updated on each frame.
You could determine at what distance the bar should be full, use Vector3.Distance to find the distance. If the distance is less than the "full" distance, divide the distance by the "full" distance to get a number between 0 and 1. Set your progress bar min to 0, max to 1 and value to the number you get. Not at a computer to fully test this out, but that's the general idea.