# Merging InputProcessor and GestureDetector

I'm planning to make a simple soccerball app. When I attempt to drag the ball, I use the touchDragged() from InputProcessor to move the ball left or right. Next, while holding before releasing, I use the fling() from the GestureDetector to set the power. However, when I'm trying to set the input processor of both the implementing InputProcessor and the GestureDetector, it didn't work. Moreover, whenever the last time you set the input processor and that would be either the two of them. Why?

Gdx.input.setInputProcessor(processorX);

To support multiple input processors simultaneously, you want an InputMultiplexer. You can add multiple InputProcessor instances to the multiplexer and it will pass events to them in the order the processors were registered.