Jump to content

data.originalEvent.touches is undefined in new version of pixi


Herbert
 Share

Recommended Posts

hi guys,

i have updated my pixi from 4.3.5 to 4.5.1, and I found there is a little change in touch event

onTouchStart(e) {
    console.log(e.data.originalEvent.touches);

    // before originalEvent is TouchEvent so it has touches
    // new version originalEvent change to PointerEvent which does not have touches
}

somehow the originalEvent change from TouchEvent to PointerEvent which does not have touches,

I used to detect touches to prevent multiple touches, so I have two question

1. what cause this change?

2. is there any other efficient way to limit the touches on my game, in my case, I only hope 1 touch exist at the same time?

thanks to your help

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...