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:
Z of camera depend on screen height
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):
- public var Zcamera: Camera;
- public var rad: float;
- public var deg: float = 30.0;
- function Start()
- {
- rad = deg * Mathf.PI / 180;...