I am trying to make a simple weapon change in Unity3D. The best way to do this is with the mouse scroll wheel, as far as I can see.
I googled on how to do this and found that I have to use Input.GetAxis("Mouse ScrollWheel"); I use this piece of code and print it. Still, I always get an value of 0.
any ideas? I just need to solve how to get the value first, I'll figure out the rest myself.
Code idea:
function Update () {
print(WeaponNumber);
if(Input.GetAxis("Mouse ScrollWheel")){
WeaponNumber += Input.GetAxis("Mouse ScrollWheel");
}
}
