Virtual control joystick force drag

Hi, I was implementing the virtual control and wanted to add the functionality that makes the joystick appear at where I tap on the left side of the screen. Still, I couldn't figure out how to keep the drag event active upon updating the joystick position. Right now I need to tap on the joystick again in order for it to start the OnDrag event.

ezgif.com-gif-maker.gifScreenshot 2022-07-27 165602.png
 
Unfortunately it's really hard to debug custom scripts without being able to step through the code at runtime. I recommend that you log/set breakpoints within your script to see where things are going wrong.
 
I found a workaround by creating another object that Inherited IPointDownHandler, IPointUpHandler and IDragHandler then pass the EventPointData to the Joystick pref
 
Top