Questions related to Multitouch - Cocos2dJS

Cocos2d-JS v3
  • thefubit
    Likes 0

    Problem Description

    Hi,

    I had just gone through lesson 43 and the related multitouch detection videos.

    I have a couple of questions.

    What is the maximum number of touches I can use? Do I just increase the array?

    What is the proper way to deal with single touches when setting up a multitouch? (This was mentioned in lesson42, but I don’t know how to properly deal with this. Do I set up another eventlistener just for single touches?)

    Thanks for the help!

  • Sonar Systems admin
    Likes 0

    For single touch use the single touch listeners from a few videos before.

     

    Depends on device but should be more than enough.

  • Sonar Systems admin
    Likes 0

     
    use "touches.length" to check for how many touches are active
    use "touches[n].getID()" to know which touch is which because every new touch is pushed to the first element touches[0].

Login to reply