unity camera zoom
2016-02-27 本文已影响32人
自由的天空
private float zoomSpeed=2.0f;
void Update(){
floatscroll=Input.GetAxis("Mouse ScrollWheel");
transform.Translate(0,scroll *zoomSpeed,scroll *zoomSpeed,Space.World);
}
private float zoomSpeed=2.0f;
void Update(){
floatscroll=Input.GetAxis("Mouse ScrollWheel");
transform.Translate(0,scroll *zoomSpeed,scroll *zoomSpeed,Space.World);
}