News: Enjoy our Christmas offer 30% off on our latest package Tower Defense Level Kit http://u3d.as/m7h

  • October 18, 2018, 02:20:48 AM

Login with username, password and session length

Author Topic: double swipe -> slow response  (Read 3356 times)

Offline wouter_vugt

  • Newbie
  • *
  • Posts: 23
double swipe -> slow response
« on: September 03, 2014, 03:05:11 PM »
I need a double swipe for pannning of a 3D scene, it works but responds slowly, if I start swiping with two fingers it takes a couple of seconds/tries before it picks up on it.
(it does work when pressing CTRL in the editor with not problems..)



this is a snippit of the code i use:

"
function  On_PinchIn( gesture:Gesture  ){
   if(gesture.touchCount >1){ desiredDistance += (Time.deltaTime*gesture.deltaPinch)*orbitSettings.zoomSpeed; }
}

function  On_PinchOut( gesture:Gesture  ){
   if(gesture.touchCount >1){ desiredDistance -= (Time.deltaTime*gesture.deltaPinch)*orbitSettings.zoomSpeed; }
}

function On_Drag(gesture:Gesture){   On_Swipe(gesture); }//if other object is in front
function  On_Swipe( gesture:Gesture  ){
    if(gesture.touchCount <2){ yDegIdial += -(gesture.deltaPosition.y * orbitSettings.rotationSpeed);}
    if(gesture.touchCount <2){ xDegIdial += (gesture.deltaPosition.x * orbitSettings.rotationSpeed);}
    //if(gesture.touchCount>1){On_Swipe2Fingers(gesture);}
}

function On_Drag2Fingers(gesture:Gesture ){ On_Swipe2Fingers(gesture); }
function On_Swipe2Fingers(gesture:Gesture ){
    idealPosition += -0.02f * orbitSettings.panSpeed * ( cam.transform.right * gesture.deltaPosition.x +  cam.transform.up * gesture.deltaPosition.y);
    //tempLabel.text = gesture.deltaPosition.x.ToString();
}
"

can you explain how to fix this?

Offline wouter_vugt

  • Newbie
  • *
  • Posts: 23
Re: double swipe -> slow response
« Reply #1 on: September 05, 2014, 09:39:09 PM »
Please give me a response, this is only thing holding my app back from being published..
Easy touch is awesome, but if this is simply not working properly then it would  be useless for me...

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: double swipe -> slow response
« Reply #2 on: September 06, 2014, 11:12:15 AM »
Hi,

Can you tell me, if you have the same issue with the example scene Two Finger ?

Have you change swipe tolerance paramater on the EasyTouch inspector ?

Nicolas

Offline wouter_vugt

  • Newbie
  • *
  • Posts: 23
Re: double swipe -> slow response
« Reply #3 on: September 06, 2014, 01:28:49 PM »
Hi,

Can you tell me, if you have the same issue with the example scene Two Finger ?

Have you change swipe tolerance paramater on the EasyTouch inspector ?

Nicolas

Hi,

Yes this also happens in your example scene.
I've set tolerance lower to 0.1 and it still happens.

I do use an old phone for testing, but this should not be an issue (an other touch plugin could handle this perfectly, but had other shortcommings).

I have to swipe up and down untill it picks up on it (sometimes right away but most of the time it takes a couple of seconds or a couple of two finger swipes before it works..)

I don't get it..? especially since it does work fine using ctrl in the editor.
I will try this on my iphone next, but again if it does not work on an older phone in such a simple scene this would still be a problem..

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: double swipe -> slow response
« Reply #4 on: September 06, 2014, 02:13:14 PM »
Can you tell me your test device,  because I haven't this issue on IPAD2, Xperia U, Nexus7...

It's very strange... And it"s only on two finger swipe, not on pinch or twist ?

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: double swipe -> slow response
« Reply #5 on: September 06, 2014, 02:16:27 PM »
And can you give me your frame rate on the destination device

Offline wouter_vugt

  • Newbie
  • *
  • Posts: 23
Re: double swipe -> slow response
« Reply #6 on: September 11, 2014, 01:00:44 AM »
it's an nexus, an old one, dont know exactly which one (about 4 years old).
Frams rate is not the problem, since swiping with one finger is really smooth and there are no problems with pinchin or swiping (only with the two finger swipe).

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: double swipe -> slow response
« Reply #7 on: September 11, 2014, 09:39:53 AM »
Do you have the possibility to send me a complete example ?


Offline wouter_vugt

  • Newbie
  • *
  • Posts: 23
Re: double swipe -> slow response
« Reply #8 on: September 11, 2014, 07:35:26 PM »
Do you have the possibility to send me a complete example ?

well no.. but using your example it doesn't work either, so you could use that as an example..
I will check it out on my iphone in a couple of days, but it should work on every device, not just some..

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: double swipe -> slow response
« Reply #9 on: September 11, 2014, 08:04:36 PM »
Hi,

EasyTouch was tested on several phones and tablets (iPad 1 & 2 & 3, Iphone 3 & 4 & 5, Xperia, Nexus 7.... Android 4.X 2.x), since 2 years a lot of users used EasyTouch, and  you're the first user that raise this issue.

If you can't send me a complet projet, send me an APK, because I have a Nexus 7 too  and I don' t have this issue. With your APK I will able to see.

Do you have the same issue with multi-finger example, when you drag multi-circle ?

It's very difficult to me to find the problem, because I don't have this issue....

Can you test this APK
https://dl.dropboxusercontent.com/u/8514696/Asset%20Store/EasyTouch/EasyTouch.apk

Do you have a skype account ?


Nicolas



Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: double swipe -> slow response
« Reply #10 on: September 11, 2014, 08:20:49 PM »
The only way, it's to add some debug log (with time)on final version. I can help you to do that.



Offline wouter_vugt

  • Newbie
  • *
  • Posts: 23
Re: double swipe -> slow response
« Reply #11 on: September 16, 2014, 07:17:35 PM »
I Tried your apk.

THe same thing, the pinching/twisting works fine (the screen is too small to test the smaller spheres) the dragging/swiping with two fingers takes a second or some wiggling two fingers around before it starts to work.
Eveything I can test in the other scenes runs really smoothly and with no problems.

The multitouch scene also works fine, I can drag two circles at the same time.

How would I go about debugging? (the function is simply not called (ontwofingerswipe), I added some debugging there, but the same problem, the debugging only runs after some wiggling on the screen)

(btw I haven't got skype...)

EDIT: the weridest thing, it suddenly works in my app(no idea why), but it still doesn't work propperly in your example apk...
« Last Edit: September 16, 2014, 09:59:15 PM by wouter_vugt »

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: double swipe -> slow response
« Reply #12 on: September 17, 2014, 12:41:58 PM »
Hi,

All this is very strange, have you changed compiler options?

I did a version, where swipe / drag has priority over the other 2 finger gesture

You can download it here. https://dl.dropboxusercontent.com/u/8514696/Asset%20Store/EasyTouch/EasyTouch.zip

 I send you the password by PM (it's just the source file EasyTouch.cs)

Tell me when you have finished the down

Nicolas

Offline wouter_vugt

  • Newbie
  • *
  • Posts: 23
Re: double swipe -> slow response
« Reply #13 on: September 17, 2014, 03:14:57 PM »
Hi,

All this is very strange, have you changed compiler options?

I did a version, where swipe / drag has priority over the other 2 finger gesture

You can download it here. https://dl.dropboxusercontent.com/u/8514696/Asset%20Store/EasyTouch/EasyTouch.zip

 I send you the password by PM (it's just the source file EasyTouch.cs)

Tell me when you have finished the down

Nicolas

Gonna try this.
But thanks for your amazing support! really appreciate it.

This doesn't change much, it still reacts slowly in the example scene.
In my app it does all work now for some reason...

I will record it with another phone to show you what happens.
I will also test it in my iphone later.
« Last Edit: September 17, 2014, 03:30:09 PM by wouter_vugt »

Offline Nicolas

  • Administrator
  • Hero Member
  • *****
  • Posts: 792
Re: double swipe -> slow response
« Reply #14 on: September 19, 2014, 01:47:05 AM »
May be it's slow on old phone, because I instantiate trail with additive shader

Code: [Select]
trail = Instantiate( Resources.Load("Trail"),position,Quaternion.identity) as GameObject;

He acknowledged that the instantiation isn't necessarily good on the phone