- Home /
Input manager, how to use positive/negative
I see that an entry named "horizontal" has a negative and positive that is A and D.
How can I use this to for example, when user presses A, it will do -1, and when user presses D, it will do 1.
Because if I use if(Input.GetButton("horizontal")) it will only use one value. How do I define what happens if user presses horizontal negative or horizontal positive?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613111436im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Convert positive float to negative? 5 Answers
Input Manager Question 1 Answer
Help In Making a SphereCast for 3D Tire! Working RayCast Script included! 0 Answers
Checking number against boolean 2 Answers
Vector3.Slerp problem 1 Answer