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);
}
本文标题:unity camera zoom
本文链接:https://www.haomeiwen.com/subject/edbwkttx.html
网友评论