- Home /
Question by
awplays49 · Dec 18, 2014 at 12:45 PM ·
Detect if a mousewheel is scrolling and what direction it is scrolling
How can i do this? Any ideas? Thanks
Comment
Best Answer
Answer by smirlianos · Dec 18, 2014 at 01:08 PM
Try this:
if(Input.GetAxisRaw("Mouse ScrollWheel") > 0)
{
//wheel goes up
}
else if(Input.GetAxisRaw("Mouse ScrollWheel") < 0)
{
//wheel goes down
}
I didn't try it, but after doing some research it should, thanks! @smirlianos
Answer by SkaredCreations · Dec 18, 2014 at 12:46 PM
Looking at the script reference is a great value: Input.mouseScrollDelta
Hey @SkaredCreations !
Unfortunately i already looked and thats why im posting. Do you have any ideas?
Your answer
Follow this Question
Related Questions
smoothly transmogrify an object as it enters a circle 1 Answer
how well does unity work for turn-based game time-type? 3 Answers
Maximum Unity Navmesh Agents? 1 Answer
dead rising on unity? 2 Answers