playMaker

Author Topic: 1.8.4 Android Touch Lag  (Read 6859 times)

HeathClose

  • Full Member
  • ***
  • Posts: 226
1.8.4 Android Touch Lag
« on: April 06, 2017, 11:18:13 AM »
I have a problem with my jump and shoot buttons having a lot of lag on my android device... they weren't there before, but with the update to 1.8.4, i see a huge delay between tapping my device and the in game response.

is this a known issue?  is there a way to download 1.8.3?

could it be something else others are aware of and know how to fix touch input lag?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 1.8.4 Android Touch Lag
« Reply #1 on: April 07, 2017, 09:41:41 AM »
Hi,

 It's unlikely a problem with PlayMaker itself here, but something that is unoptimize in the logic executed around pressing that button.

 I would profile inside Unity and see what's going on and how it's affected even on mac and pc, usually you will see the same performance bad effect if you look at the numbers even tho it's not as dramatic, on mobile every minor issue is amplified because of hardware constraints.

Bye,

 Jean

HeathClose

  • Full Member
  • ***
  • Posts: 226
Re: 1.8.4 Android Touch Lag
« Reply #2 on: April 07, 2017, 05:30:12 PM »
Hi,

 It's unlikely a problem with PlayMaker itself here, but something that is unoptimize in the logic executed around pressing that button.

 I would profile inside Unity and see what's going on and how it's affected even on mac and pc, usually you will see the same performance bad effect if you look at the numbers even tho it's not as dramatic, on mobile every minor issue is amplified because of hardware constraints.

Bye,

 Jean

so I redid the logic for the jump and took one extra step out of it... and that helped... but what is really happening is that "ugui on click" happens only when i release my touch... so the delay is coming from my touching it and the having to release the touch before my character jumps... it's small but noticeable... and of course I can just hold my finger on purpose and nothing happens until I release and then my character jumps.

is there something else I could use to get that touch on the way down, something other and ugui on click?  something that works on the touch down, not up?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: 1.8.4 Android Touch Lag
« Reply #3 on: April 07, 2017, 06:00:34 PM »
Hi,
Try the ugui pointer component.

HeathClose

  • Full Member
  • ***
  • Posts: 226
Re: 1.8.4 Android Touch Lag
« Reply #4 on: April 07, 2017, 07:29:52 PM »
Hi,
Try the ugui pointer component.

tried on pointer down... you would think that would function as described... but it still only works on releasing my finger... i can hold it there and nothing happens... i can tap and nothing happens... at least not until my finger comes off the screen... even in the editor it only fires when i bring the mouse button back up

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: 1.8.4 Android Touch Lag
« Reply #5 on: April 08, 2017, 12:50:54 AM »
Hi,
Works fine here.
You do not need the button script and don't forget to select your event target (pointing to the object with your fsm)

HeathClose

  • Full Member
  • ***
  • Posts: 226
Re: 1.8.4 Android Touch Lag
« Reply #6 on: April 08, 2017, 09:03:07 AM »
Hi,
Works fine here.
You do not need the button script and don't forget to select your event target (pointing to the object with your fsm)

no button script?

without the button script nothing happens at all

and even if i make the event point to an fsm on pointer down... it still only works on release (with button script enabled, otherwise nothing happens)

HeathClose

  • Full Member
  • ***
  • Posts: 226
Re: 1.8.4 Android Touch Lag
« Reply #7 on: April 08, 2017, 02:56:20 PM »
maybe it's possible that I'm not setting up my buttons correctly...

i have an invisible button on my gui that takes up the left half of the screen for jump... right half has a similar button for shoot

the buttons have no image and the alpha on the color is 0 so they are transparent.

I add an fsm to the buttons with an ugui on click global that triggers the states (add force to player, spawn ammo at ammo spawn point, etc.)

is there something i'm doing wrong?  is there an easier way?

you said make sure my target was set... I have never messed with that before... is there anything anywhere explaining what that is and what it does?

I also have easy touch 5 if that helps, but I have no idea how to use it.. or even how to set up a simple button...can't find any tutorials anywhere for playmaker integration... short of how to install the actions... which is SO incredibly frustrating that a developer would develop for non coders... and then expect them to understand how to turn their coder instruction into playmaker integration... i see that a lot... and as an instructor... it baffles me... and is so discouraging...  :'(

i just want my buttons to work on the down stroke... i don't understand my issue

I appreciate the help, thank you very much for spending the calories on me
« Last Edit: April 08, 2017, 03:16:56 PM by HeathClose »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: 1.8.4 Android Touch Lag
« Reply #8 on: April 09, 2017, 06:02:07 PM »
Hi,
You need to target the gameobject with the fsm that you want to use to send an event and remove the button (script) in the hieracy.

There is also a custom action called : Touch Screen Left Or Right
on the Ecosystem

HeathClose

  • Full Member
  • ***
  • Posts: 226
Re: 1.8.4 Android Touch Lag
« Reply #9 on: April 09, 2017, 06:13:06 PM »
Hi,
You need to target the gameobject with the fsm that you want to use to send an event and remove the button (script) in the hieracy.

There is also a custom action called : Touch Screen Left Or Right
on the Ecosystem

thank you so much for your help... I'm sorry that I'm inexperienced and confused....

do you mean in the inspector?

HeathClose

  • Full Member
  • ***
  • Posts: 226
Re: 1.8.4 Android Touch Lag
« Reply #10 on: April 10, 2017, 05:15:48 PM »
actually... this explains it all... and it's your video... I'm glad I saw someone else reference this with some even more research... thanks for making that video... in fact... this could have been my solution for tap to rotate without buying easy touch (which i don't know how to set up anyway) so i had to get a programmer to write a tap to rotate script for me...

thank you for your help, i appreciate it

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: 1.8.4 Android Touch Lag
« Reply #11 on: April 11, 2017, 01:26:06 AM »
Hi,

 So you did not succeeded with easyTouch? I though I replied to you explaining what to do? too bad...

 Bye,

 Jean

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: 1.8.4 Android Touch Lag
« Reply #12 on: April 11, 2017, 03:36:50 AM »
Hi,
Which video are you referring to?

I am planing to buy easy touch one day, when i do i will see that i can make a tutorial for it :)

HeathClose

  • Full Member
  • ***
  • Posts: 226
Re: 1.8.4 Android Touch Lag
« Reply #13 on: April 11, 2017, 08:38:52 AM »
Hi,
Which video are you referring to?

I am planing to buy easy touch one day, when i do i will see that i can make a tutorial for it :)

heheh... sorry... i never linked the video I found... this one...


Hi,

 So you did not succeeded with easyTouch? I though I replied to you explaining what to do? too bad...

 Bye,

 Jean

it's possible I missed it...I'll take a look