MarcoFazioRandom / Virtual-Joystick-Godot

A simple virtual joystick for touchscreens, for both 2D and 3D games, with useful options.
MIT License
731 stars 80 forks source link

Bug: Flicking Joystick to opposite end too fast results in input not being released #63

Closed IndieJoJo closed 9 months ago

IndieJoJo commented 10 months ago

By flicking the joystick to the opposite end, input is not released and both ui_left and ui_right can have assigned values at the same time, resulting in slowed and other unexpected movement of character.

IndieJoJo commented 10 months ago

By adding this the issue is fixed

`if use_input_actions: if output.x > 0: _update_input_action(action_right, output.x) Input.action_release(action_left)

else: _update_input_action(action_left, -output.x) Input.action_release(action_right)

if output.y > 0: _update_input_action(action_down, output.y) Input.action_release(action_up) else: _update_input_action(action_up, -output.y) Input.action_release(action_down)`

etherealxx commented 9 months ago

I'm sure he's talking about this: 2024-01-1217-05-46-ezgif com-video-to-gif-converter

And yes, i've tested the solution and it works.

MarcoFazioRandom commented 9 months ago

Fixed with #62