hi guys , beleave that its nearly two days that im searching but i cant find a solution for my problem , so please help me if you can …
im using an orthographic camera in a 2d side game , and i just want zoom in/out the camera in width not in height when i use this code
thisTransform.camera.orthographicSize = Mathf.Lerp (thisTransform.camera.orthographicSize ,.007 + thisTransform.camera.orthographicSize, Time.time);
the camera zooms out in height too and some part of sky is shown , that i dont want , i just need show the more area of the earth ,
also when i use this code
thisTransform.camera.rect = Rect (0, 0, 1, .5);
the output comes out from full screen mode , so would anybody tell me that how can i modify the width ratio of the camera without modifying the height…
thanx alot , and alot more
If you zoom out in width only while keeping the same camera rect, the image will get horizontally compressed: objects will appear thinner and taller than they actually are - is this what you're actually trying to do?
– aldonalettono i dont want that , for example i just wanna show a wider range of the sea while the sky area is fix ,now the width and height of camera rect are equal and i wanna increase the width of the rectangle withought changing the height
– hamis there anybody in there ...? just nod if you can hear me....
– hami dont know http://docs.unity3d.com/Documentation/ScriptReference/Camera-aspect.html
– MountDoomTeam