multitouch multi touch confusion

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

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

    Please login to see this link.

    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.

  • 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

  • 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. . . . :)

  • 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 :)

    Please login to see this picture. Please login to see this link. - Please login to see this picture.

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

    Please login to see this picture. Please login to see this link. - Please login to see this picture.

  • Can you send us a simple example file showing us the problem? You might be doing something different than what I expect.

    Please login to see this picture. Please login to see this link. - Please login to see this picture.

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

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!