Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to use the mouse scroll wheel to move the camera in unity

float scroll = Input.GetAxis ("Mouse ScrollWheel");
    transform.LookAt (target);
    transform.Translate(0, 0, scroll * speed, Space.Self);
 
PREVIOUS NEXT
Tagged: #mouse #scroll #wheel #move #camera #unity
ADD COMMENT
Topic
Name
8+8 =