using UnityEngine;
using System.Collections;
public class zoom : MonoBehaviour {
private float zoomSpeed = 2.0f;
void Update () {
float scroll = Input.GetAxis("Mouse ScrollWheel");
transform.Translate(0, scroll * zoomSpeed, scroll * zoomSpeed, Space.World);
}
}
using System.Collections;
public class zoom : MonoBehaviour {
private float zoomSpeed = 2.0f;
void Update () {
float scroll = Input.GetAxis("Mouse ScrollWheel");
transform.Translate(0, scroll * zoomSpeed, scroll * zoomSpeed, Space.World);
}
}
mouse scroll to zoom unity c#
4/
5
Oleh
Unknown