I\'m developing a game using libGDX and I would like to know how I can drag and drop an Actor. I\'ve made my stage and drawn the actor, but I don\'t know how to trigger that eve
If you don't want to use DragAndDrop class, you can use this:
DragAndDrop
actor.addListener(new DragListener() { public void drag(InputEvent event, float x, float y, int pointer) { actor.moveBy(x - actor.getWidth() / 2, y - actor.getHeight() / 2); } });
Edit: method drag instead touchDragged
drag
touchDragged