In case someone comes across it, this solution worked in my case:
Camera can zoom in / out and be moved on x/y axis, and some objects (game dialog) must be opened at fixed size regardless of camera zoom.
If using orthographic camera, just use the orthographic size (assuming you start at 100), and use it as scale for the fixed size object (if not, you can easily convert it to % from 100 if object scale isn't 100 by default).
say camera at size 120 (farther from plane, object must be larger, and will be scaled to 120% of it's original size).
public void updateScale() {
float size = Camera.main.orthographicSize;
Vector3 scale = new Vector3 (size, size, size);
objectToScale.transform.localScale = scale;
}
Trending Articles
More Pages to Explore .....