Search code examples
androidlibgdx

Disable multitouch in libgdx


I use Stage and Actors in my project. Can I disable and enable multitouch in runtime? I'm using libgdx 0.9.7.

Sorry for my English.


Solution

  • Add an InputMultiplexer, add a custom InputProcessor that returns false in the touch methods if the pointer index > 0. Then add the Stage to the input multiplexer. That way, the first input processor will swallow all events of second/third/... touches.

    From libgdx forum.