Hello, this is my take on how to make a Joystick for character movement in Kodular.
At the moment this project consists of 510 blocks so i will not upload any photos of them, i highly recommend to download the .aia or .ais files and read the code to better understand the concept.
Example with IsDynamicJoystick variable set to true.
Example with IsDynamicJoystick variable set to false.
1Implemented “Circle-Line Intersection” method to create circular collisions for the joystick bounds.
2Added “JoystickStrenght” variable that returns a percentage of how much the joystick is pulled from its origin point.
3Added*“IsDynamicJoystick”* variable that let’s you use the joystick at any point on the screen dynamically.
Implemented “Linear-Interpolation Function” at the Joystick Touch-Up Event so that the character doesn’t stop immediately.
Play around with the c increment value to see cool behaviors.
Default Value: 0.1 | Accepted Values: 0 - 1