Advertisemen
In this short unity tutorial, I am going to show you guys, how to zoom In and Out camera like in binocular in Unity3D.
First of all, create two GUITextures [GameObject > Create GameObject > GUITexture], name them ZoomIn and ZoomOut or your preferred names and position them wherever you want, you can also change image if you want (by default it has Unity watermark image). Why GUITexture? coz it sticks with camera while we are zooming in and out.
Ok, now create two C# scripts with names ZoomInCamera and ZoomOutCamera or pick any name you want and attached them with GUITextures we have just created accordingly. And type following in these scripts.
ZoomInCamera script -
ZoomOutCamera script -

Advertisemen
Tidak ada komentar:
Posting Komentar