I want to automate this game. https://fernandoruizrico.com/examples/phaser/first-game/index.html
In this, how do i make the object reach a specific position on the screen? I can programmatically drag the joystick, but i want to know the logic / algorithm to implement on the joystick.
Eg: If i want the object to go towards top right of the screen, I will drag the joystick from center at an angle of 45 degrees. Similarly, I want to know what logic should be implemented to make the object move to specific position on the screen.