In my game, I’m trying to zoom the camera in when scrolling. I’m using Input.GetAxis("Mouse ScrollWheel")
and there are no complaints there.
However, scrolling with my mouse zooms in (roughly) 5 times slower than with my trackpad! I need both my mouse and trackpad to scroll at (roughly) the same speed.
Here’s what I’ve tried to no avail:
- Adjusting the mouse scroll speed in my laptop settings.
- Adjusting the trackpad speed in my laptop settings (couldn’t adjust trackpad scrollspeed).
- Using
OnGui()
to check if I was scrollingif (Event.current.type == EventType.ScrollWheel)
via mouse or trackpadif (Input.mouseScrollDelta.y == 0) use Trackpad
.
I’ve tried number 3 for hours in all kinds of different ways and I couldn’t get it to work.
Something weird I found out was that, checking for mouseScrollDelta.y, it would always be 0 if I wasn’t focused on the game window, and use rounded up trackpad speed if I was.
Windows 10, Unity 2018.1.6f1.
I don’t know what to do anymore.