User Tools

Site Tools


en:tutorials:input:analog_joystick_gamepad_control

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:tutorials:input:analog_joystick_gamepad_control [2020/08/20 04:54 (5 years ago)] – ↷ Page moved from en:tutorials:analog_joystick_gamepad_control to en:tutorials:input:analog_joystick_gamepad_control sausageen:tutorials:input:analog_joystick_gamepad_control [2020/08/31 05:37 (5 years ago)] (current) – ↷ Links adapted because of a move operation sausage
Line 15: Line 15:
 When pushing the stick in any direction, after getting past the small threshold, the value can be read using the ''orxInput_IsActive'' and ''orxInput_GetValue'' functions. When pushing the stick in any direction, after getting past the small threshold, the value can be read using the ''orxInput_IsActive'' and ''orxInput_GetValue'' functions.
  
-Let's work through setting this up. Firstly, ''init'' up a new project using [[en:tutorials:creating_your_own_project|these instructions]].+Let's work through setting this up. Firstly, ''init'' up a new project using [[en:tutorials:projects:creating_your_own_project|these instructions]].
  
 Once you have a working project, add in the following graphic into your project's data to act as the object that will be controlled by the joystick: Once you have a working project, add in the following graphic into your project's data to act as the object that will be controlled by the joystick:
Line 62: Line 62:
 In the same way, the ''JOY_LY_1'' means that if the analog stick has been moved up or down the Y axis, it will register an ''UpDown'' value. In the same way, the ''JOY_LY_1'' means that if the analog stick has been moved up or down the Y axis, it will register an ''UpDown'' value.
  
-For more details, see: [[en:tutorials:analog_stick_threshold|Analog Stick Threshold]]+For more details, see: [[en:tutorials:input:analog_stick_threshold|Analog Stick Threshold]]
  
 Finally in the ''Run()'' function, we can add the code to respond to these "movements". ''Run()'' is not normally the recommended place to put this code, but for demonstration purposes, it is fine: Finally in the ''Run()'' function, we can add the code to respond to these "movements". ''Run()'' is not normally the recommended place to put this code, but for demonstration purposes, it is fine:
en/tutorials/input/analog_joystick_gamepad_control.1597924452.txt.gz · Last modified: 2020/08/20 04:54 (5 years ago) by sausage