Tag Info

Hot answers tagged

1

You could update the position over time: currentPos = currentPos + Math.signum(currentPos - touchedPos) * wayPerTime * deltaTime; wayPerTimestep is your velocity. deltaTime is the time passed since the last update. currentPos is the current position of your player (might be x, y or both as vector). touchedPos is the position the player has clicked on the ...


1

You can use InputAdapter class and methods touchDown(int screenX, int screenY, int pointer, int button) Called when the screen was touched or a mouse button was pressed. boolean touchDragged(int screenX, int screenY, int pointer) Called when a finger or the mouse was dragged. boolean touchUp(int screenX, int screenY, int pointer, int button) Called when a ...



Only top voted, non community-wiki answers of a minimum length are eligible