Multi_Touch Question.

The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
edited June 2012 in Working with GS (Mac)
Okay so I know 99% of the code to do multi_touch. As I haven't worked much with this, I have two actors I am controling their postions based on touch a typical grab and drag around. I have both actors able to see who was touched first, thereby telling them to follow either touch one or touch two. Now here is my question, as I haven't tested this yet, when I release touch 1 will actor two still see it's touch as touch two or will it need to default to touch one? Bacically cycling between it's touch one and touch 2 rules? I'm just being sure my code is refined so I don't have lag with the cycling.

Best Answer

  • The_Gamesalad_GuruThe_Gamesalad_Guru Posts: 9,922
    edited June 2012 Accepted Answer
    Thanx but after a few hours of testing I figured it all out now. I am able grab all three actors let any one or two go and grab it again and move them without using tshirts method which uses the distance around the actor so now I can overlap all three actors while touching all of them at once even in their touch zones and not pick them up or screw them up at all even when I'm moving all three at once and overlapping each other right until my fingers with all three actors are touching each other. Although I do appreciate the offers.

Answers

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Gah I cannot remember. I have gone through the same thing as you are talking about in the past but cannot for the life of me remember how exactly it acted.

    I think it was something weird like it followed the same touch point but the touch count dropped so it was really screwy if you touched again with the now second touch.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    hmmm so I'll have to do a protoype test watching the touch count attribute just to see how it is charting it. That should give me an idea about what is going on...will report my results.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Yes thanx that pointed me in the right direction and I did some testing and now I have a better idea of how it functions. So the multi touch count reports how many fingers are touching the screen..period no matter if an actor is there or not as well as logging where each of those touches are. I would like to do some further tests to see how it shuffles the touches. So if I place four fingers on the screen in order of time 1,2,3,4 and remove finger three my guess is it would make touch four now touch three. I can quickly see the limitations, atleast in GS, where if you had an instance where you dragged and actor over another one with multi touch rules you would pick up that actor as well, which could be a plus for a collection type move as all those actors would collect around the one you are dragging. But if you didn't want that to happen you would need a bunch of lockout attributes.
  • UtopianGamesUtopianGames Member Posts: 5,692
    edited June 2012
    Yes it records how many fingers on on the device no matter if the actor is on the scene or not.

    I have an old template i made "somewhere" where you can go round the scene NOT collecting the other actors.

    Darren.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited June 2012
    Another note; what I found in my testing is that once you touch the screen, let's say with three fingers, and you lift finger 2, the computer still tracks finger one as touch one and finger three as touch three until you remove that finger so if now I remove finger 1, finger three still is touch 3. The computer locks it in until it is removed.
  • ORBZORBZ Member Posts: 1,304
    =))

    Multi touch in GS is funny.
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    It's just how apple designed multi touch you just have to see how it works. I'm like 95% there on build really effective code for it's full use for moving around many actors at once.
Sign In or Register to comment.