- Home /
Question by
darrenunity · Feb 09, 2020 at 08:19 PM ·
animationinputscrollwheel
Using mouse scroll wheel to set animator trigger once in Update()
I have the following code in an Update() block:
if (Input.GetAxis("Mouse ScrollWheel") > 0)
{
animator.SetTrigger("Flicking");
}
However, if I do a big single scroll, it sends the trigger a few times and results in the animation being played two or three times.
I want the gesture of scrolling up on the mouse wheel to set the trigger off once.
Any ideas?
Comment