Problem with joysticks, need help (JavaScript)
So, I have two joysticks, one to move and one to shoot, and I have been trying for a while to make it so that both joysticks can be moved at the same time, and so that the touch which drags each joystick is somehow identified so that only when this specific touch is released the joystick gets placed back to the center. I have managed to do this so far, but there is one bug I don't understand, if you start moving one joystick, and then start dragging the other without releasing the first, and then you release the first joystick and try to drag it again, both joysticks will for some reason be dragged towards that last touch. I don't know why, my code logic may be a little complicated to gasp at first, so if you are up to the challenge take a look and help me figure out a solution: https://code.sololearn.com/Wzcu6ECNgsp6/?ref=app