"Is touching" triggered on distant touches

Get help using Construct 2

Post » Thu Apr 25, 2013 11:29 pm

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 SliderMarker adjusts to where the finger current currently is located on the Slider.

+ Touch: Is touching Slider? SliderMarker, Set Y to Touch.Y
+ Touch: Is touching SecondTouchArea?

During my testing, the SliderMarker adjusts to where the finger is currently touching the Slider. I can also touch the SecondTouchArea without problems.

When I branch out to different devices and/or different browsers, I see a new problem. When I'm touching the SecondTouchArea, it sometimes takes control of the SliderMarker.

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

1) Touch the Slider and move around. Watch the SliderMarker move with the finger
2) Drag off the Slider and watch the SliderMarker stop.
3) Drag back onto the Slider and watching the SliderMarker move again.
4) Repeat steps (1) through (3), this time moving a second finger inside the SecondTouchArea.

The bug occurs in step (4): the SliderMarker moves up and down with the finger in the SecondTouchArea, and stays that way until both fingers are removed from the screen. Often times, I cannot control the SliderMarker 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.
B
7
S
1
G
1
Posts: 11
Reputation: 1,322

Post » Sat Apr 27, 2013 8:55 pm

Hi again! I've simplified the problem and provided more direct observations of what I'm seeing.



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!
B
7
S
1
G
1
Posts: 11
Reputation: 1,322

Post » Sun Apr 28, 2013 8:15 am

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.
B
55
S
19
G
8
Posts: 191
Reputation: 8,831

Post » Sun Apr 28, 2013 4:29 pm

I tried to use the Touch.YAt( Touch.Index ) and Touch.YForID( Touch.ID ). A very similar problem occurs: the blue SliderMarker 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 Slider. The logic would then only allow a touch with that same Touch.ID to manipulate the SliderMarker. Unfortunately, this did not work either.

Are there any other ideas?
B
7
S
1
G
1
Posts: 11
Reputation: 1,322

Post » Mon Apr 29, 2013 6:57 pm

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!
B
7
S
1
G
1
Posts: 11
Reputation: 1,322

Post » Wed May 01, 2013 7:41 pm

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

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Thu May 02, 2013 3:17 am

I completely removed the SecondTouchArea 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.wsims2013-05-02 03:18:27
B
7
S
1
G
1
Posts: 11
Reputation: 1,322


Return to How do I....?

Who is online

Users browsing this forum: Magistross and 2 guests