User Tag List

Results 1 to 6 of 6

Thread: Cannot figure out multitouch

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cannot figure out multitouch

    I have added the multitouch object to my frame, enabled multi touch for the frame and now what? I expected that my existing objects would react to touches on the existing User clicks the left button events. What am I not doing that I should?

  2. #2
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Re: Cannot figure out multitouch

    Whenever you are only touching the screen one place it will work as if you were using your mouse on the PC. Whenever you have multiple fingers touching the screen then Xmouse and Ymouse will still only work for the first finger that was put in the display. You can instead get the other touches through expressions and conditions in the Multitouch object.

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot figure out multitouch

    How would I translate that easily into a continuos "If the Touch X, Y was on a particular object"?

    How does this impact non-square objects and irregulars like characters with alpha channels? Is multi touch really not useful in these scenarios?

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot figure out multitouch

    You could have 1-pixel objects for each touch and check for overlapping
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export Module

    Join Date
    Aug 2011
    Location
    Beverly Hills, CA USA
    Posts
    508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot figure out multitouch

    Here is more detail for the benefit of others that may look to this for an answer since I found that the docs are almost non-existent and the answers here more point you in the right direction than answer the question:

    The basic solution I used was to put an Always event in my Game that places existing off-screen objects at the X/Y location of the first two "touches" in the Multi Touch object. I did this using the following:

    #1

    Added two objects that are simply circles the size of a typical finger tip named:

    Object Multi Touch 1
    Object Multi Touch 2

    At Start of Frame set them to "Make Invisible" so they still work just are not apparent to the user. For my App I only care about the first two concurrent Multi-Touches, but you could expand this to support the possible 10 very easily.

    #2

    I don't care about get the X,Y if users slide their fingers around the screen for my app. I only care about the touch end points so here is how I register them:

    A touch has ended, number 0 - Set X Position of Multi Touch 0 - to XTouch( "Multi Touch Object", 0 )
    A touch has ended, number 0 - Set Y Position of Multi Touch 0 - to YTouch( "Multi Touch Object", 0 )
    A touch has ended, number 1 - Set X Position of Multi Touch 0 - to XTouch( "Multi Touch Object", 1 )
    A touch has ended, number 1 - Set Y Position of Multi Touch 0 - to YTouch( "Multi Touch Object", 1 )

    If you wanted the X/Y points to register always you going literally just use the Set X Position etc. in your Always.

    #3

    Since I only care about end points, I want to push my end points offscreen constantly. To do this I do the following:

    // This puts each Multi Touch point object offscreen again since the Multi Touch points 0-9 (I'm only caring about the first two 0 and 1 ) X,Y coords could be constantly updating as the user slides their fingers around the screen.
    Always - Set Position at - Object Multi Touch 1 - -500, -500
    Always - Set Position at - Object Multi Touch 2 - -500, -500

    #4

    Since I want to test collisions of end points with other objects, I simply use the standard cick event for handling mouse/first touch events regularly:

    User clicks with left button on "Some target object"

    OR

    "Object Multi Touch 0" is overlapping "Some target object"

    This approach game be the desired effect of capturing the first two taps on the screen that may occur concurrently and determining if they were taps on particular objects on the screen itself while disregarding any dragging or sliding of the fingers.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module

    Join Date
    Jan 2011
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Cannot figure out multitouch

    Excellent Keith!
    Thanks for sharing this Good luck with your projects!

Similar Threads

  1. Can't figure this out and need help...
    By KLiK-iT in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th April 2012, 12:43 PM
  2. I can't figure this one out myself... help please
    By Pineapple in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 15th March 2011, 06:26 PM
  3. Can't figure out condition
    By LB in forum The Games Factory 2 - Technical Support
    Replies: 2
    Last Post: 13th June 2007, 04:31 PM
  4. I can't figure this out.
    By Roencia in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 19th March 2007, 10:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •