- Home /
How can I set the mousewheel scroll speed in a ScrollView?
I have a ScrollView that's pretty long, and I want the user to be able to use the mouse wheel to scroll through it. The problem is, the wheel only scrolls about 25 pixels at a time and I need it to scroll a lot more than that.
Is there any way to change the mousewheel scroll speed for a ScrollView?
Barring that...
Is there any way to turn off mousewheel scrolling altogether inside a ScrollView? (then I can use my own scrolling code to adjust the position)
Answer by AlanMattano · Mar 31, 2016 at 04:22 PM
@Only change the Scroll Sensitivity value to 32 or 16.
Select the Game Object that contains the Scroll Rect component. Look into the Inspector. Search the Scroll Sensitivity input value and change it to a value that fits better for you case. This value will set the mouse wheel scroll speed.
Answer by DaveA · Aug 31, 2010 at 07:06 AM
Could you detect when focus is in your ScrollView and muck with the Sensitivity on the 'Mouse ScrollWheel' input profile?
This was from months ago and I ended up using a different method altogether to do what I needed so I'm not even sure if your answer would work or not, but thanks for trying.
Could you post your answer here, for posterity? I'm sure others may run into this too (it interested me anyway)
Answer by Boco · May 06, 2011 at 05:40 AM
I found this to work for me, with some tweaking. At least for slowing it down.
scrollPosition= Vector2.Lerp(scrollPosition,GUILayout.BeginScrollView(scrollPosition),.2);