Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Z of camera depend on screen height

$
0
0
I have a gameobject.
What I want is that the size of this gameobject is always the same with respect to the screen height of the device where it's displayed. So with a device with a large screenheight, the gameobject is more zoomed in than a device with a small screenheight.

What I have now is this but it's not working good:

Code (JavaScript):
  1. public var Zcamera: Camera;
  2. public var rad: float;
  3. public var deg: float = 30.0;
  4. function Start()
  5. {
  6.    rad = deg * Mathf.PI / 180;...
Z of camera depend on screen height

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>