D
D
Dmitry Korolev2016-07-08 20:54:06
css
Dmitry Korolev, 2016-07-08 20:54:06

How to use the scroll wheel?

How to use the scroll wheel?
if I twist forward, then bool, if not, then fall
and back the same way)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anna_BS, 2016-01-13
@Anna_BS

codepen.io/Anna_Batura/pen/EPvZvB

S
st_rapon, 2016-07-08
@adressmoeistranici

Input.GetAxis("Mouse ScrollWheel") - Returns a positive number when scrolling up and a negative number when scrolling down.
float tmp = Input.GetAxis("Mouse ScrollWheel");
if (tmp > 0f)
{
// up
}
else if (tmp < 0f)
{
// down
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question