- Home /
I have trouble with the mousescroll wheel
EDIT: So I kinda know what the problem is now. I just dont know how to fix it. Made a film because its harder to explain by words in a language im not born with.
So the setup is good. You need to make sure you are calling CheckWeaponSwitch(); from the Update() function.
@metalted Ok take it really slow now and explain like your talking to an autistic child. What does that mean
Answer by xxmariofer · Apr 01, 2019 at 05:36 PM
go to the input section and make sure there is an axis called Mouse Scrollwheel, if there is one please make sure to use the exact same name, (Probably you are missing a cap ScrollWheel)
Debug oog mousewheel value, if while scrolling down and up is zero, it is a input settings problem, maybe the input is not set up or something, first debug its value
Answer by metalted · Apr 03, 2019 at 04:16 PM
Example: public void Update() { CheckWeaponSwitch(); }
public void CheckWeaponSwitch()
{
float mousewheel = Input.GetAxis("mousewheelname");
if(mousewheel > 0)
{
//do something
}
if(mousewheel < 0)
{
//do something else
}
}
Your answer
Follow this Question
Related Questions
is possible mouse wheel key in else than GetAxis? 2 Answers
Changing GUI Texture with mousewheel? 1 Answer
Scroll wheel axis not resetting to 0 0 Answers
Mouse Scrollwheel not detected in launcher 0 Answers
Mouse ScrollWheel Loop 1 Answer