How do I fix touch in a project

0 favourites
  • 4 posts
From the Asset Store
Surena Touch
$2.50 USD
A wrap from official Touch plugin to export touch/mouse input to other plugins.
  • I'm using r243

    I've been struggling to get touch working right for a project, it's easy enough for the most part and works fine on a desktop but when I test on a samsung s4, things like touch and drag affect the browser window, refresh if I drag downward and double clicking in the app will cause the browser window to zoom in/out. Whenever I touch the event registers, and will stay 'in touch' until I let go, or, if I drag around the screen without letting go intouch will also end.

    But here's the tricky part, I looked at the Space Blaster example, and built and ran it to see if it had the same issues, it does not, it works exactly like it should, drag events on the game window do not affect the browser, and intouch events work continuously, the only thing I noticed was I'd get a little vibration from 'long press' but no other side effects there. I did everything I could to try to make my controls work exactly the same in my main project, with no luck.

    The final deal is that I created a bare minimum project to test further, it's just a text field, and a Touch object followed by setting the text field to show where I was touching, that worked flawlessly as well. So I can see that things *should* work just fine, but there seems to be something that can mess things up,

  • 'Fullscreen in browser' set to 'off' is apparently the culprit, I had changed that setting at some point working on some other issue (I don't recall what anymore, and I don't think the setting made a difference for that issue).

  • I could be wrong, but it sounds to me that most (if not all) of your issues come from your gamewindow being out of focus.

    Touching outside of your gamewindow will make the browser respond to your touches instead of the game.

    (tapping the game window at this point should work)

    This is also why using a fullscreen in browser setting will resolve the issues.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • No, I was touching within the game window, I haven't tested my bare bones file to see if changing the full screen setting matters or not but I'll probably do that, I'm just trying to finish up the project before sleeping and it's late already.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)