I recently rented a car which had an HUD for your speed, as well as the current speed limit.

When looking at it, it seemed to float above the front of the hood. I took a picture  of it which came out pretty well.

I am wondering how they get it to float, instead of looking like it's sitting on the windsheild, and whether they can control where it appears to float. For example, could something be changed that would make it feel like it was closer, perhaps in the middle of the hood instead of at the front of it? How about if they wanted to make it seem like it was three car lengths in front of the car?

If it is possible to change where it appears to float, what do they have to change about it to have that effect?

EDIT silly fingers added an apostrophe to the "its" in the title, and I can't change it.