android - Unity - input latency is way too high but game has decent frame rate -




i implemented input mobile game so: have buttons , have anywhere else on screen. when player touches screen , not button ingame, character jumps. now, implemented using onpointerdown , onpointerup sets bool:

public class jumpinput : monobehaviour {     public static bool jump;     public void pointerdown()     {         jump = true;     }     public void pointerup()     {         jump = false;     } } 

if player jumping, checked fixedupdate method:

if (!movementdisabled && grounded && jumpinput.jump) {     //then can jump     currentimageindex = 0;     animstate = charanimstates.jumpstart;     //added again here      //zeroing out y axis velocity if had 1     rb2d.velocity = new vector2(rb2d.velocity.x, 0.0f);      //until here     jump = true; } 

as decent frame rates when using post-processing, have no clue why input delayed. require assistance verify if solution "anywhere on screen input" viable performancewise , not, how improve it.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -