"Is touching" triggered on distant touches

0 favourites
  • 7 posts
From the Asset Store
Desert themed set of tiles for your platformer game.
  • I'm working on a project with three touch areas (TouchFail.capx or browse to the HTML5 export). I've stripped my example to two touch areas.

    The player may adjust a parameter using the slider and get extra points by moving around in the second touch area. The <font face="Courier New, Courier, mono">SliderMarker</font> adjusts to where the finger current currently is located on the Slider.

    + Touch: Is touching <font face="Courier New, Courier, mono">Slider</font>? <font face="Courier New, Courier, mono">SliderMarker</font>, Set Y to Touch.Y

    + Touch: Is touching <font face="Courier New, Courier, mono">SecondTouchArea</font>?

    During my testing, the <font face="Courier New, Courier, mono">SliderMarker</font> adjusts to where the finger is currently touching the <font face="Courier New, Courier, mono">Slider</font>. I can also touch the <font face="Courier New, Courier, mono">SecondTouchArea</font> without problems.

    When I branch out to different devices and/or different browsers, I see a new problem. When I'm touching the <font face="Courier New, Courier, mono">SecondTouchArea</font>, it sometimes takes control of the <font face="Courier New, Courier, mono">SliderMarker</font>.

    I can make a video if it'll be clearer, but here's the testing steps:

    1) Touch the <font face="Courier New, Courier, mono">Slider</font> and move around. Watch the <font face="Courier New, Courier, mono">SliderMarker</font> move with the finger

    2) Drag off the <font face="Courier New, Courier, mono">Slider</font> and watch the <font face="Courier New, Courier, mono">SliderMarker</font> stop.

    3) Drag back onto the <font face="Courier New, Courier, mono">Slider</font> and watching the <font face="Courier New, Courier, mono">SliderMarker</font> move again.

    4) Repeat steps (1) through (3), this time moving a second finger inside the <font face="Courier New, Courier, mono">SecondTouchArea</font>.

    The bug occurs in step (4): the <font face="Courier New, Courier, mono">SliderMarker</font> moves up and down with the finger in the <font face="Courier New, Courier, mono">SecondTouchArea</font>, and stays that way until both fingers are removed from the screen. Often times, I cannot control the <font face="Courier New, Courier, mono">SliderMarker</font> any more and have to restart the application.

    Am I using the Construct 2 language wrong and/or is there a better way to do this? Or is this an issue with, say, Chrome on Android?

    I feel like I've got too much junk here... if anybody needs me to provide some more information, please let me know and I'll get it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi again! I've simplified the problem and provided more direct observations of what I'm seeing.

    <img src="http://machinecodegames.com/showoff/touchfail2/Construct2TouchProblem.jpg" border="0">

    File: TouchFail.capx

    HTML5 Export: http://machinecodegames.com/showoff/touchfail2

    Video: http://youtu.be/ExbvFMWZEro

    Am I completely missing how the "Is touching" event is supposed to work? Is there a better way to accomplish what I want? I'd like to think this is a bug in Construct 2, but I'm still so new to this way of expressing my intentions that I'm worried that I've overlooked something simple.

    Thanks!

  • Hmm... really strange)

    I saw somewhere smth like this. There was ask about two fingers and decision was using layers.

    I forgot how it was((

    It was like this: is touching object -> object set position to mouse.y(1)

    (1) - its a layer number.

  • I tried to use the Touch.YAt( Touch.Index ) and Touch.YForID( Touch.ID ). A very similar problem occurs: the blue <font face="Courier New, Courier, mono">SliderMarker</font> toggles between the Y values of the two touches.

    In the past, I've tried to capture the Touch.ID of the finger that first touches the <font face="Courier New, Courier, mono">Slider</font>. The logic would then only allow a touch with that same Touch.ID to manipulate the <font face="Courier New, Courier, mono">SliderMarker</font>. Unfortunately, this did not work either.

    Are there any other ideas?

  • I guess I'm going to give this one last bump before I write up a bug report. I'd really hate for this to be an obvious problem.

    Thanks!

  • Have you tried adding another condition to your event, an "inverted" (right click the condition - Invert) "Is touching SecondArea..." ?

    <img src="https://dl.dropboxusercontent.com/u/36472942/construct/forumhelp/Touch_oneobject_nottheother.PNG" border="0" />

  • I completely removed the <font face="Courier New, Courier, mono">SecondTouchArea</font> and the problem still occurs:

    [TUBE]http://youtu.be/fZArCAqv_wo[/TUBE]

    Edit: Note, this was after I followed the steps from the bug post.

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