- Home /
scripting joystick input on javascript
i cant figure it and i need to stay one step ahead of everyone else if i am to win the contest and this contest will be a chance to prove to myself i will be able to make real video games and be successful
Answer by Unity_scat · May 02, 2016 at 05:14 AM
Go to Edit then Project Settings then Input. Create a new Input. To do this, open the drop down called Axes and increase the size by 1. The one at the very bottom is the new one. Click on the new input and edit the settings. Make it's positivite, negative, whatever button be the name of the button on the Joystick. The Type will be Joystick Axis. The Joy Num should be Get Motion from all Joysticks. You should set the name of your input to something easy like Run or Jump. Then in your code, to see if the button is pressed from the input, type (if the Button's Name is "Run" and you want to check if it's pressed): if(Input.GetButtonDown("Run"))
Your answer
Follow this Question
Related Questions
How do I call on a player to inherit the input based on the joystick number? 0 Answers
joystick connected 1 Answer
Permanent unintentional Input on Axis 1 Answer
2D rotation around hinge joint with joystick input 0 Answers
Analog stick control 1 Answer