Z
Z
Zimaell2021-03-11 10:31:04
Unity
Zimaell, 2021-03-11 10:31:04

How to swipe objects?

Now my cubes are moving by - clicked on one (selected) clicked on the other and then it moved there, well, that one in its place, I do this on each prefab, I attach the script where it is

void OnMouseDown(){
        Ci.ClickOnCell(this);
        }

well, there already in the script it is written that the first one is selected or it is already the second one and you need to move it there, or deselect it if it is far away and put the selection on it ...

How in this case to remake it so that there is a swipe with a nearby object?

In unity, I read that there is no such MouseMove itself, or there is, but it only works in the editor ...
In general, what would you advise in this case?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question