hello guys, i am working on 2D game using orthographic camera.I am using the following code to decrease the size of camera to Zoom in/out the objects.my object got zoom in perfectly,but i want to control the zoom in speed a bit slow instead of sudden. please tell me how can i do that. Code (csharp): camera.orthographicSize=4.6;
You'll have to update the camera.orthographicSize value every frame in the Update() method. You can use the Mathf.Lerp method to interpolate the values between the zoomed out value and the zoomed in value.