Multitouch joystick causing movement without being touched

On android it works even better
My thumbstick is perfectly held in range of joystick background
And is going on it’s own no matter which direction i move it to
Nox_2022-10-29_08_15_3Ej6YQrKTF

I do think it is related to you not using a deadzone. I’d recommend you use the example I gave a screenshot of above, using the events I recommended. This doesn’t mean opening the base example from the example list, it means using the events as I have them set up with above, or doing the additional setup I mentioned with a parent event and sub events.

If you cannot solve it from there, I’d recommend creating a new thread with your specific example as it is unrelated to the topic of this thread.

I have it working, somewhat. I need to do some tweaking because the movements act kind of like top-down movements, but the problem of having force from the start is gone.

1 Like

I’d similarly recommend setting up a deadzone as I showed above, for the reasons mentioned.

You can add a single event condition to set one up as shown in the screenshot I have above, and even use the “direction pushed” events along with it.

Im still all ears if you have any other ideas
Also why my thumbstick isnt blocked in joystick background? Why it does not work for me?
GDevelop_2022-10-29_08_47_5Qfhtiqh6a

Unfortunately, you didn’t actively set up a deadzone. You just used the deadzone condition off on its own event with no other actions. Your current setup doesn’t match my example above, nor does it match the other alternative

If you want to use 0.001 as a deadzone, make it not inverted, and move all of your directional events underneath it (as subevents, so they’re indented).

(Event 1) (The deadzone condition here, not inverted)
    (SubEvent 1) Direction "Down"
    (SubEvent 2) Direction "Left"
etc

Your other question doesn’t make sense to me as a sentence, so I can’t give you guidance there, apologies. The above is the extent of the information I will be digging into on the subject at this point.

Well now it does not move on it own

But 2 things

1 - I still get no input on android for whatever reason (on PC i do get as you score increase)
Under development build text there still is score counter which does not change while moving Thumbstick

2 - And by thumbstick going out of joystick background i mean
Joystick background = smaller circle which is the base of whole analog
Thumbstick = small circle which you actually drag in any direction to move something
On android it behave as it should Thumbstick is locked inside area of Joystick
On PC Thumbstick goes beyond area of Joystick

Nox_2022-10-29_09_29_csHrH1o15Y

BIG THX @Silver-Streak You set me on right track trying to troubleshoot my problem

Ok things i figured out so far
1 - Joystick moves on it’s own when you set multitouch joystick behavior to both joystick background and joystick thumb
ONLY JOYSTICK BACKGROUND should have this behavior (that object you put on your scene)
Joystick Thumb object should not have this behavior and then it won’t move on it’s own

2 - I had black background i did not have any point of visual reference to see if my object is actually moving
like when you make space shooter then stars and asteroids are indication that your ship is moving
If you would have whole black screen background it will look like your ship is in 1 place

3 - If Joystick Thumbstick move out of area of the Joystick Background then check are names in the events are correct (most likely they are not)

4 - If your Joystick Thumbstick does not move at all check if in action “simulate touch on joystick” with thumb at position MouseX(“UI”,0) have correct name of your UI layer
For example if your UI layer is named UIJoy then that line should look like MouseX(“UIJoy”,0)
Be sure to set on top of all actions an ACTION without any condition “Activate Joystick” and make sure both objects selected are correct

Original message below

Because i changed name of image
I had to set Joystick (sprite you put on the scene) as well background and as thumbstick
Now thumb moves inside the circle after JoystickBG (sprite you put on the scene) is object selected properly
And JoystickThumb (object which you actually drag and that shows up in center of Joystick background) is properly selected

Problem is i still have issue where without that deadzone condition You posted above i still have it moving on it’s own
But with it i don’t
Also i don’t have any input at all with my score tracker
So it’s like physically joystick is working fine but technically not sending any data

I was trying to recreate this example
GDevelop 5 but i fail

For whatever reason i am able to rotate my player with joystick yet i he does not move at all (while i move that joystick)
Even with W key he is like not receiving any input
Why it only rotate but don’t move is beyond me

I think i figured touch controls but to help you i need you to tell me
Will your game be mobile or desktop or desktop + mobile compatible?
Because turns out touch controls are different for desktop and for mobile with multitouch joystick extension
But here is proof of concept it does work
It will run on both mobile and desktop perfectly fine
But if i would wish to change animation so when character attacks it actually change animation to swinging hand WHILE moving
I would need to break the controls to different events for each desktop and touch and both could not be active at the same time
And that condition (check if mobile device) or (check if device have touch) does not work for me at all so i guess won’t work for many other ppl - maybe i have crappy phone :wink:

And again BIG THANK YOU to @Silver-Streak You set me on right track and your dead zone fix was real game changer here

1 Like

I gave up, decided to delete the MultiTouch Joystick extension and just make my own buttons. Never got the Joystick to work and when I tried switching to the Dpad instead it just froze the game up.

Im sitting 4th day setting it up
Yesterday i finally figured out how to get D-Pad and Analog Joystick to work
Like 15 mins ago i figured out it’s possible to even “FAKE” swipe any direction to move into that direction, which i am now implementing (WIP)
Problem is you have 2 different things
Touch being done and button is pressed
That’s why what works for PC won’t work for mobile
And you most likely like me did not know which is which
Launch my game on your phone in browser (link at the end)
It works perfectly fine
By default you have analog joystick but invisible (left side of screen joystick and on right action button)
Press that controller icon in upper right corner to show controls
Press it again to show D-Pad controls

If you still want it to get to work i will be more than happy to help
But again tell me for what you are making that game
PC or mobile or both?

I disabled touch/mouse controls for desktop because well look at this game what good mouse would do there anyway?
W A S D + Space

That’s a video review with a bunch of talking over random play footage. Classic example of something that should be typed rather than spoken.

FYI - The multitouch extension has been updated so that the conditions will only be true when the controller has moved away from the center. If you have already installed the extension, you can update it inside GDevelop. Any new installs of the extension will get the updated version.

2 Likes