How to set an if (Input.GetAxis ("Vertical")){ script?

Not letting me do that. Presuming I’m going to have to declare a value as well or something

Hello,
have you read the Unity Documentation about Input.GetAxis?
There is an example of keyboard/joystick input.

You declare a float variable for each axis and store the result of Input.GetAxis(…) in it.
Then you can use this value for calculations.

1 Like

If you’re not adding some useful information to a super old thread (6 years old), you’re just necroing it and causing noise for others so please use the like button instead to show your appreciation of the help.

Thanks.