- Home /
Input.GetAxisRaw ("Mouse ScrollWheel") not working
if (Input.GetAxisRaw("Mouse ScrollWheel") > 0f )
{
selectedGuns++;
if (selectedGuns >= allGuns.Length)
{
selectedGuns = 0;
}
}
This is my code when i scroll down i expect the gun model to change but it doesnt it doesnt give any exception or error pls help
Comment
Answer by mikelo · Apr 01 at 05:55 PM
I think you are looking for Input.mouseScrollDelta
Change selectedGuns when Input.mouseScrollDelta.y
is positive or negative.
Your answer

Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
ENEMY MOVEMENT SCRIPT 0 Answers
Game doesnt start after adding Admob 1 Answer