GUI for primary flight display

Hi

I am making a flight simulator and currently making Primary Flight Display that consists of various flight gauges and meters etc. Something like this flight display.
However, I can’t imagine a way to get this done.

For example, how can the scale lines in the altitude meter be made, so that, when aircraft is ascending, the scale will move down. One way I thought was to make scale lines with Line Renderer, but it seemed too hacky.

For making attitude meter, I thought of making scale readings as sprites in a cylindrical fashion around a separate camera, and pitch and roll that camera according to the aircraft’s pitch and roll. However, I would then need to billboard each of these readings by script and I think they might not look perfect near the screen edges. I also have NGUI license if it may be of use.

Sounds like you’d be better off just building a 3D cockpit or whatever parts you want in your UI.

  • Put all the UI elements in a separate layer.
  • Use an Orthographic camera to make positioning of components easier.
  • Set Culling Mask to only the layer that your UI elements are on.
  • Remove the UI element layer from Culling Mask on the main camera
  • Set Clear Flags to ‘Depth Only’.
  • Set Depth to a higher value than your main camera.

Altogether this should give you your cockpit rendered on top of the main perspective, with the ability to get all the 3D effects you’ve mentioned. Note that you don’t have to move the cockpit or its camera around since it will always just render to the same position on the screen.

Put the cockpit and its camera all in a Prefab and you can easily adjust it and re-use it in as many scenes as you like. You might want to edit it in its own scene to avoid complications from other elements in your levels - just be sure to push the changes into the prefab when you’re done.

I figured out that sane options would be to use either GL.LINES or Vectrosity from Asset Store. Since I’m using using Unity free and Android basic versions, I can’t use GL.LINES since GL is Pro only. So I bought Vectrosity. Its quite intuitive for building line based HUDS just like I need. I do have plans to buy Unity Pro but still then I would use Vectrosity.
Thanks