Jump to content

Multitouch Issue


KaizokuCoder
 Share

Recommended Posts

Multitouch is working for me in most situations, but there seems to be a problem with the touchend call.  If I touch the same object with two touch points and then release them both, I only get a single call to touchend.

 

This is causing me lots of problems.  Is the behavior expected or is it a bug?

 

Thanks.

Link to comment
Share on other sites

I have the same issue too.

Maybe it is my fault, I just started playing with pixi.js

 

This is my very first 'project' and I'm just trying out things, so it's a mess of code.

But if someone could tell me what I've done wrong I would be happy.

 

The screen is made from 3 input areas.

upper-left part:    fly up

downer-left part: fly down

right part: shoot

(also works with up-down arrow, space)

 

http://glatar.hu/mlpgame/1/

 

also, is it possible to identify the touch at touchend?

Link to comment
Share on other sites

this is pretty common in multi-touch development on iphone/ipad.

 

Basically the touchend event is not fired for each touchstart, specifically when you release the fingers very quickly together. If you release them one after the other very slowly it usually works.

 

The same actually happens with touchstart too if you tap too quickly with two fingers (only one is registered).

 

So far the best workaround I've found is to traverse the event.touches array on touchend and check how many fingers are actually registered. Remember that touches are uniquely identified by event.touches[n].identifier, so it's pretty easy to know which finger did what.

Link to comment
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...
 Share

  • Recently Browsing   0 members

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