Help With Multi-Touch

EastEastWbEastEastWb Member Posts: 12
edited November -1 in Working with GS (Mac)
Hi Everyone,

Let me preface this by saying I've looking through past forums and the Joystick tutorial by Codemonkey and am still having problems (although I'm not sure why, it seems like it should've worked). My screen is split between an area with buttons that get pressed and a different area that when touched, should constrain an actors size (game.sizex and game.sizey). When my first touch is in the area without buttons, the actor with constrained size works fine, but if I'm holding a button and then touch the other screen the actor gets constrained to the button. I've tried to constrain the size of the actor based on touchcount (so if touch count equals 2, I constrain the size to touch 2x, touch2y, touch count 3, touch3x, touch3y and so on), but it's not working. Any help would be amazing!

EEWB

Comments

  • PhoticsPhotics Member Posts: 4,172
    There's another Joystick example in my book... The Unofficial GameSalad Textbook ...which was created as an alternative to Codemonkey's example.

    Basically... it doesn't use invisible sensors... which seem to get stuck on me, jamming the controls.

    Instead, it uses touch positions. If the controller actor is touched... and if a touch position is in a specific area, then the controller uses the touch data. If not, then the next touch point is checked. One of the touch positions has to be within the area, as the actor is touched. By using rules, instead of invisible sensor actors, I can get the touch data.

    I'm not sure, but this technique might work for your game... as your working in split areas.
Sign In or Register to comment.