User Tag List

Results 1 to 9 of 9

Thread: multitouch multi touch confusion

  1. #1
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export Module
    jregork's Avatar
    Join Date
    Oct 2009
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    multitouch multi touch confusion

    Ok, here's what I've got right now. Controls that look like this:

    http://img341.imageshack.us/img341/6319/controlsa.png

    A left button. Right Button. And the built in control buttons (1 and 2).

    So obviously the left and right buttons need to operate in a typical fashion. Holding them down will result in the player moving left or right. In my case holding left or right will add or subtract to a counter where negative values move him to the left and positive to the right.

    Right now I was using the built in fire buttons for shooting and jumping.

    For the left and right arrows, which are active objects, I have it set like so:

    -Repeat while mouse button pressed
    -repeat while mouse pointer is over arrow button
    +add to counter

    So that he stops when you release I have:

    -mouse pointer is not over left arrow
    -mouse pointer is not over right arrow
    +add/subtract to counter towards 0

    On PC this expectedly causes him to keep moving even if you're not holding the button down, you have to move the pointer from the left/right arrow object. But it ended up happening when testing on the device in a different way. Instead of removing your finger and it deactivating, he keeps walking as if the pointer is still over the object. If you tap somewhere else it then moves the 'pointer' and he comes to a stop.

    Now, the bigger problem is that if you are holding the jump button (I have an adjustable jump where he goes higher as you hold the button) the arrow buttons won't respond. If you are already 'holding down' the arrows, the jump will respond just fine.

    The other problem I'm having is that it will not reposition the built in fire buttons. I used -start of frame +set button positions to ____ but they just sit where they usually do.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperiOS Export Module

    Join Date
    Nov 2011
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    have a look at the multitouch example in the iOS Specific Example Files Sub forum, i found that to help me with my multitouch setup... i pretty much use that in all the apps i have been messing with lately, i only use the mouse click on things that are really simple.

    the issue i think you have is that... when you click on the arrow the device updates the location of the touch and when you release it stays on said location, only updating on the next touch (this is what i found with my testing in the past) now with the multitouch object and the example above, it keeps the location of the first second and third (if you make that many) touch in real time... from pressing/holding and releasing... this so when you relese the touch you can have the collision box moved out of frame and then when touched it will jump to the x/y of the finger

    hope this helps

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export Module
    jregork's Avatar
    Join Date
    Oct 2009
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I will take a look at that example. I have looked at most of the topics on the forum and my confusion is this:

    You seem to need to break down the touches by number. Maybe I'm not understanding correctly, but it looks like each touch requires a separate event (touch 0, 1, 2) so I would need to duplicate my events in the case that the user hits the 'right arrow' when they're already holding jump (that would be the second touch) or if they hit the 'right arrow' when nothing else is touched (first touch). Maybe this is not the case (and I would hope it's not) and I'm just overthinking it. I wish it could just understand the mouse click event multiple times, maybe that's coming. . . .

  4. #4
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    I'm not 100% sure, but I think this was fixed in a recent beta version.
    Can you confirm this by trying out the latest beta version? Remember to back up

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export Module
    jregork's Avatar
    Join Date
    Oct 2009
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Which problem was that? The touch position lingering?

  6. #6
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    It was a problem where a new touch somewhere could cancel other touches and make them not register. As I said I am not 100% sure it is the same problem but it might have an influence on it's behavior in some way.

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export Module
    jregork's Avatar
    Join Date
    Oct 2009
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What about the problem with the buttons xy positions? Am i doing something wrong there?

  8. #8
    Clickteam Clickteam
    Anders's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Århus
    Posts
    3,456
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Can you send us a simple example file showing us the problem? You might be doing something different than what I expect.

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export Module
    jregork's Avatar
    Join Date
    Oct 2009
    Posts
    266
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok I've worked out the multitouch issue. I supersimplified it by just using "Touch _ is active" "set touch object _ to touch _ position". For situations where I didn't want the player to be able to 'hold down' a button I just used a flag to recognize when the player released the button. I then store all my touch objects in the center of the screen away from the onscreen buttons when their respective touches aren't active.

    Since I moved away from the built in buttons I'm not worried about the XY issue, but I will post an example for people who may run into the same problem I did. I'll also post an example of how I did multitouch onscreen buttons.

Similar Threads

  1. Multi Touch D-pad example
    By DaveC in forum iOS Specific Example Files
    Replies: 21
    Last Post: 23rd April 2015, 09:34 PM
  2. [BUG RC7] Touch has ended stops working on app restart. Multitouch Object.
    By UrbanMonk in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 29th March 2013, 07:53 PM
  3. Please help me :/ multi touch
    By Outcast in forum iOS Export Module Version 2.0
    Replies: 11
    Last Post: 16th January 2013, 06:09 AM
  4. multi touch
    By cfullerNY in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 17th January 2012, 06:11 PM
  5. [BUG] Multitouch Instant Crash on Touch
    By geothefaust in forum Android Export Module Version 2.0
    Replies: 17
    Last Post: 8th December 2011, 01:56 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
  •