camera zoom

    Unity 3D 카메라 줌인/줌아웃

    Unity 3D 카메라 줌인/ 줌아웃 소스코드 using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraZoom : MonoBehaviour { public int zoom = 20; public int normal = 60; public float smooth = 5; private bool isZoomed = false; void Update() { if ( Input.GetMouseButtonDown(1)) // 마우스 오른쪽 버튼으로 줌인/줌아웃 // 키 변경 가능 { isZoomed = !isZoomed; } if(isZoomed) { GetComponent().fieldOfVi..