morosenerd

Is there a way to detect multitouch capabilities?

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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.