Jump to content

Is there a way to detect multitouch capabilities?


morosenerd
 Share

Recommended Posts

Hi!

 

My default interface requires at least 2 touch pointers, but I could provide a slightly more awkward alternative with only 1 touch point requirement if I detect that the device does not support simultaneous touches. Two questions:

 

1) Can it be done with Phaser (or JavaScript in general)?

2) Is it necessary anyway? I personally don't even know any devices with only 1 touch point, but I guess the templates that come with Phaser have .maxPointers = 1 for a reason. Are there many devices with only 1 touch point?

 

Thanks for help.

 

To clarify, my interface would be as follow:

- touch left side of the screen to move left,

- touch right side of the screen to move right,

- you can't move left and right at once, but I want the 2nd touch (for example, right) to be detected even if the user is still touching left - this way I think it's slightly more responsive.

Link to comment
Share on other sites

I know how to use multiple pointers, but I need to be able to DETECT if the device is CAPABLE. It seems that I actually skipped a crucial sentence in my post, sorry for the confusion.

 

My question is: is it possible to detect the maximum number of touch points the current device can track at once (or at least: is it possible to detect if it's > 1). Bonus question: is there a significant share of mobile devices currently in use that can only accept one touch point.

Link to comment
Share on other sites

  • 9 months later...
  • 2 years later...

Hi

I am new to Phaser and for my game i only need 2 touch at the same time.  My game character can run left, right and jump.  When i test using the keyboard the character can jump while running left or right.  But when i use the touch screen while the character is running it can't jump. 

thanks

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...