Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
two finger touch... — Gideros Forum

two finger touch...

GregBUGGregBUG Guru
edited December 2011 in Suggestions & requests
sorry guys, i feel stupid i can't figure how to simply detect if the player touch the screen with two fingers!! :((

i assigned to the STAGE event listner the event Event.TOUCHES_BEGIN and it fires up when the player touch the screen
but how to detect two fingers?

thanks!
Gianluca.
TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
www.tntengine.com
+1 -1 (+3 / -0 )Share on Facebook

Comments

  • atilimatilim Maintainer
    edited December 2011
    :)

    I think the easiest way is the control the length of event.allTouches array. If it is 2, then exactly 2 fingers is touching the screen.
    local function onTouchesBegin(event)
      local isTwoFinger = (#event.allTouches == 2)
    end
    Btw, did you check Touch Explorer example? It can be very informative.
  • GregBUGGregBUG Guru
    edited December 2011
    thanks it works perfect!!!

    btw yes i checked the example Touch Explorer...

    i also checked the api documentation but no info on the array event.allTouches or event.touches

    wow! my first gideros game is almost finished!

    thanks atilim!
    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
  • atilimatilim Maintainer
    You're welcome :)

    Yes, the reference manual doesn't contain information about events. But you can refer here: http://www.giderosmobile.com/documentation/events.html
  • thanks atilim,
    for you help

    but i think that gideros need a bit more "in deep" docs because without your help i never figured the existence of event.allTouches


    ciao ciao
    Gianluca.
    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
  • atilimatilim Maintainer
    I cannot agree more. We'll start working on a more organized documentation after the next release.
  • hey guys ... you are doing an outstanding job!

    but you never sleep? :-O

    good night! I-)




    TNT ENGiNE for Gideors Studio - Particle Engine, Virtual Pad, Animator Studio, Collision Engine - DOWNLOAD NOW !!! IT'S FREE!!! -
    www.tntengine.com
  • gorkemgorkem Maintainer
    Sleeping is for humans [-X
Sign In or Register to comment.