Hello, I’ve made a simple control for “dual stick” control. The right stick if you don’t move just shoot. When you move the stick rotates the character then the left stick just moves. I left the “topdown movement” behavior inside to test on pc.
I’m still a beginner, but I hope to be a starting point.
Thanks and sorry for my bad English.
Looks great, I like the player animation. Is it free to use?
You may want to consider to add a little more comments for beginners and submit the example either on GitHub or Discord to be included with GD
I was going to make some suggests but what the… I’ve the sources right here, so I’ve taken a look and did some changes, let me know what do you think: game_edited.zip (7.46 KB)
It does the next changes:
Instead checking if the cursor is/is not over a button check if the button is being dragged, this way you can move the fingers far from the max stick distance.
Instead *180/pi, use ToDeg()
Added two extra objects that work as the sticks center, this way you can check the position and distance against this center object instead magic numbers, also it allows moving the sticks position easily in case you need to redesign the UI.
Instead of adding a force in function of the X and Y distances from the center independently, add a single force with the stick angle and distance as force, why?, because separate X and Y makes the diagonals to move faster than horizontal or vertical only.
The same than above (total distance instead X and Y distance) applied for the animation speed scale.
Thanks for the suggestions. I’m still a beginner in gdevelop, I was happy to do that. I’ve programmed windows phone 7 before. It wasn’t now You would have an idea, if I use pathfinding for enemies, how could they avoid each other? Now climb on each other.