User Tag List

Results 1 to 4 of 4

Thread: Multi-touch and swipe?

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export Module
    GameMaker2019's Avatar
    Join Date
    Jul 2012
    Location
    U.S.
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multi-touch and swipe?

    Hi, just got the IOS exporter and have a couple of questions. In my project the play area is just swiping. On the menu, they would touch a button (example - to load a new game).

    Since I am using swipe and touch a button do I need multi-touch or can I do just single touch? (The player would not be swiping and pressing a button at the same time.)

    Second question...how do I enable swipe? The player will move around the screen via swiping. I can't find the option to do that, just the standard player clicks with left mouse button stuff.

    Thanks very much, you guys are so helpful on these forums. I really appreciate the community here

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,142
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You'll need to do swipe manually, basically you need to check the difference between the mouse/touch position in a frame and the position it was in in the previous frame to see how fast the touch is moving and in what direction. So, for example if just using horizontal swiping I'd have a global value 'TouchX' and a global value 'LastTouchX', and every frame you'd set LastTouchX to TouchX and then set TouchX to the current X position of the touch (in this specific order!) and use some conditioning to make sure it doesn't count the first time (i.e. A touch has started/User clicked, do the same in reverse order so that it doesn't count the distance between the last touch and a new one).

    There are also conditions in the multitouch object you can use to get the start point of a touch vs. the current position of it, those could be used for similar effect. It's all about comparing where the touch was previously to where it is now.

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export Module
    GameMaker2019's Avatar
    Join Date
    Jul 2012
    Location
    U.S.
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm. I'll be more specific to see if there is as easier way to do this. The player (active object) can move 4 ways. Up, down, left and right.

    I want the player to move those directions when the person swipes the screen. They swipe up, the player object moves up, they swipe right the player object moves right, etc.

    Right now I the player set to "Eight Directions" for movement (with only 4 directions chosen, up, down, left, right) and when I test it with the PC the arrows control the movement.

    Thanks

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleXNA Export Module
    DistantJ's Avatar
    Join Date
    Jan 2008
    Location
    Gloucester, UK
    Posts
    2,142
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Multi-touch and swipe?

    You can't really do much with the 8 direction movement without using the built in touch joystick, you will need to use another movement like bouncing ball or vector.

Similar Threads

  1. Multi Touch D-pad example
    By DaveC in forum iOS Specific Example Files
    Replies: 21
    Last Post: 23rd April 2015, 10:34 PM
  2. Please help me :/ multi touch
    By Outcast in forum iOS Export Module Version 2.0
    Replies: 11
    Last Post: 16th January 2013, 07:09 AM
  3. Bug multi touch beta6
    By rom in forum iOS Export Module Version 2.0
    Replies: 9
    Last Post: 13th November 2012, 09:23 AM
  4. multi touch
    By cfullerNY in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 17th January 2012, 07:11 PM
  5. Multi-touch suggestion
    By AndyH in forum iOS Export Module Version 2.0
    Replies: 9
    Last Post: 3rd March 2011, 10:58 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
  •