0 votes

I'm making a game that consists of dragging objects and placing them in the right place (puzzle type). Once it is assembled, you will see a flow chart.
When I run the program on my computer it works perfectly, but when I want to export the game to android, it exports without any error.
I install the game in my cell phone, it loads correctly, but when I get to the scene where I have to select the object and drag it to the right place is the problem, because in the first instance you can't select the object immediately, then if you want to choose another object in logar it's impossible.
You can see it better in the video that is in this direction:

Please, if you can help me correct this mistake.

You can find the coding at the following address for download : http://programacionybasededatos.vzpla.net/godot/practica_en.html

in Engine by (24 points)

The project link at the above address just leads to a 404 error...


Didn't check the whole project but I had a short look at "objscriptDnD.gd"

At least the functions onareamouseentered/exited won't work (unless you actually attach a mouse to the android device). Android touch screen won't generate a mouse over as they don't notice your finger hovering over the display.

Any mouse click and move events are only emulated (if checked in the project settings) by godot using touch events.

Also Drag & Drop is difficult on touch screen devices. Unless the dragged item is bigger than your finger. Maybe you could enlarge the object while it is dragged.

1 Answer

0 votes

Excuse me, I understand that this is not impossible to perform on an Android device.
Could you suggest other possible alternatives to what I'm developing?

by (24 points)

Drag and Drop is possible on Android/Touchscreen devices. But it has to be changed/adjusted or replaced which another method.

This also depends on the size of the device and the complexity of the drag & drop sources and targets. And some ideas may seem useful but may not be very intuitive.

Drag & Drop may work well on a 13" tablet but it may be nearly impossible to perform it on a 5" phone screen.

I would think of a solution like that:
* #1 You select one item by touching/clicking it.
* Then the item will be highlighted.
* The possible "drag" targets are clearly marked. (Maybe with animated pointers or similar).
* #2 You touch/click one of the targets

Thank you so much for your help.
Can you help maybe with a sample suggestion?

I don't have a sample for that at hand.

I can only link to a classic drag & drop example here:

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.