New multitouch, how to implement and...is it necessary in this case?
mangasprai
Member, PRO Posts: 35
Hi guys, i have seen that in new gamesalad, the new touch "active" attribute has been added, but really, i cannot still figure out how to make swipes, taps, and holds work altogether. i have this game where you have to tap to jump, and swipe to attack.
there is a invisible half-screen division, so no buttons, you just tap(right or left), or swipe(down left part of the screen) on the screen.
Such simple motion but still i am having problems because when i hold the jump, the swipe with the other finger gets messy.
plus the swipe gets messy itself and i had to add billions attributes to make work like i wanted.
Check out:
- it calculates if the touch is less than the release in X axis = right swipe
- it calculates that the release is far enough
- it calculates that the mouse is inside the area for the swipe
- and that the finger has been released
- then it calculates how much time you held the finger.. (too slow=not a swipe)
what am i missing?
am i confusing too much myself?
do i need the new multitouch?
Comments
What the new multitouch active attributes do are to tell you when a specific touch is being used. What you can do with that is you can have different actors (appropriately labeled) to constrain their positions to specific touch attributes when that touch is active. Otherwise, hide off screen or something. Then what you can do with those actors is you can use Rule conditions in other actors to detect collisions with the touch specific actors.
Now you don't specifically need these new attributes to figure out swipe direction or detection unless you have some system that has differences in swipe with touch 1 or swipe with swipe 2.
that sounds pretty complicated...
i kinda gave up and cleaned all the mess with a simple
"when touch is pressed"..
no swipe, just touch. i definetely had to calculate swipe 1 or swipe 2, as swipe was to attack and tap to jump, so accidentally you hold the jump and attack with a "swipe 2".