I need a scrip so that what in the input "Aim" is held then the camera sensivity will go from 0.6 to 0.2. How do I do this P.S. I prefer javascript. I just started scripting so I don't know much, but I've been learning Java. It would be easier in case the script didn't work
Code (JavaScript): function Update () { if(Input.GetButton("Fire2")) lookSensitivity == 0.2 if(Input.GetButton("Fire2") == false) lookSensitivity == 0.6 } Hope this helps. This code is assuming your look sensitivity variable is named "lookSensitivity" and that your aim button is right mouse click.
So, it wont recognize lookSensitivity, but I have no idea how to figure out what the variable should be? How do I figure this out?
Put this code in the same script as your mouse look script. Look for the Look Sensitivity variable. If you are using the Character Controller from Unity it should be "lookSensitivity."