0

I'm currently trying to create a game on my phone using the Pydroid IDE. I'm using Pygame and I would like to use the pygame._sdl2.touch function to detect multi touch on my phone. Learning from the official Pygame website, I apparently need to install SDL2, and that's what I did. I have currently installed Pygame and PySDL2 and imported Pygame in the code by typing import pygame, and I'm now locked, because the pygame._sdl2.touch function doesn't work. I tried importing sdl2 (typing import sdl2, it works and do import sdl2), and it didn't help.

What can I do to be able to use this function ? If there is another way to detect multi touch on phone using python, I would be happy to hear it. Thanks !

Tried pygame._sdl2.touch, sdl2.touch, pygame.sdl2.touch and always got an error telling me this function doesn't exists.

Rabbid76
  • 202,892
  • 27
  • 131
  • 174
Grieljis
  • 1
  • 1
  • You can use `pygame.FINGERDOWN` and `pygame.FINGERUP` see [`pygame.event`](https://www.pygame.org/docs/ref/event.html) module and [How to use Pygame touch events in a mobile game?](https://stackoverflow.com/questions/69593109/how-to-use-pygame-touch-events-in-a-mobile-game). – Rabbid76 Dec 16 '22 at 12:26

0 Answers0