Hi,
We have the following code:
if Input.is_action_pressed("Joy0LeftAnalogUp"):
JoystickDirection[InputJoyOne] = JoyUp
elif Input.is_action_pressed("Joy0LeftAnalogRight"):
JoystickDirection[InputJoyOne] = JoyRight
elif Input.is_action_pressed("Joy0LeftAnalogDown"):
JoystickDirection[InputJoyOne] = JoyDown
elif Input.is_action_pressed("Joy0LeftAnalogLeft"):
JoystickDirection[InputJoyOne] = JoyLeft
if Input.is_action_pressed("Joy1LeftAnalogUp"):
JoystickDirection[InputJoyTwo] = JoyUp
elif Input.is_action_pressed("Joy1LeftAnalogRight"):
JoystickDirection[InputJoyTwo] = JoyRight
elif Input.is_action_pressed("Joy1LeftAnalogDown"):
JoystickDirection[InputJoyTwo] = JoyDown
elif Input.is_action_pressed("Joy1LeftAnalogLeft"):
JoystickDirection[InputJoyTwo] = JoyLeft
if Input.is_action_pressed("Joy2LeftAnalogUp"):
JoystickDirection[InputJoyThree] = JoyUp
elif Input.is_action_pressed("Joy2LeftAnalogRight"):
JoystickDirection[InputJoyThree] = JoyRight
elif Input.is_action_pressed("Joy2LeftAnalogDown"):
JoystickDirection[InputJoyThree] = JoyDown
elif Input.is_action_pressed("Joy2LeftAnalogLeft"):
JoystickDirection[InputJoyThree] = JoyLeft
Works ok, but sometimes there is undesired movement.
How can we read game controller analog stick value in GDScript code?
We would like to do:
if (JoyAnalogValue < (JoyAnalogMinValue/2) ):
#Do something
Let us know, thanks!
"TetriStory 110%" Release Candidate 1 will be finished by end of this weekend.
Then will test for a week and release on February 14th...
Jesse