Relation between Orthographic camera size and object scale?

I have some objects in my game that are intended to be HUD items. When I zoom out with an orthographic camera by changing the orthographicSize property, I don’t want my HUD’s size to change. So I thought I’d increase the scale of my HUD as I zoomed out. Is there some magic number I can use to set the scale based on the current orthographicSize property?

Hm? As the documentation page states, the screen height is just camera.orthographicSize*2 world coordinates, it doesn’t get much simpler than that. Also, that’s not even relevant, since you can use relative scaling. So store your initial orthographicSize size somewhere, and then scale your HUD with orthographicSize/storedSize.

Note unless you also want to shift positions around (which of course also change), keep all your individual HUD objects in an empty GameObject attached to the camera, make sure it has no local transformations except a z position that’s larger than your nearClip value, and only scale this object. All children objects will then seem to stay in place, when changing the size.