[Solved] Get pointer position repeatedly while dragging (DD)

Hello, iam new in thunkable and trying to migrate to drag and drop feature.

Iam used to app inventor where we can get the pointer position while dragging on top of the canvas. I could not find an option while dragging event as the replacement in thunkable. Iam trying to make Pong games where the paddle following my finger for as long as my finger still touching the phone.

Here is what’ve tried.

  1. Turn on draggable feature but the problem the paddle move everywhere, i want to stay at the bottom screen
  2. Use when canvas pointer down or paddle sprite is clicked, it does not support drag feature so i have to keep clicking the screen
  3. Combine the no.2 and repeat or forever + move paddle sprite to following active pointer x.

no 3 is working as what i expected but i need a block to stop the movement when i stop touching the phone.

Thunkable does not have “mouse up” detection which is what you need. I requested this feature two years ago: Canvas sprite should have mouse up detection · Issue #951 · thunkable/thunkable-issues · GitHub.

1 Like

Yes, just like “mouse up” function in Scratch. So we have to create our own procedure to detect when the mouse up then. Thank you for the reply.

Here is my own procedure though it is not flexible. Please give suggestion if you have a better way. Currently it restart the timer when there is a change in X. Otherwise, the TimerInterval will start time and change the “click” to false.


PS: please ignore set label1 as i forgot to remove it

Something like this?

Test Project:
https://x.thunkable.com/copy/d0f5ede70a2516e6e95604486fd9754b


1 Like

Brilliant, it worked! Thank you. The “is dropped” required Draggable to be on, it is quite confusing. But thank you so much

1 Like