Hi everyone,
I have a question about an issue I came across regarding keyboard delay after game build.
I’m currently working on a 2D game in which the character can move from side to side and jump. While previewing the game in the unity game screen everything works fine as I move and jump.However, after building and running the game on my computer, the player moves with a slight yet noticeable delay after each key press(side to side movement/jump).
Here’s the code I’m using for the jump and horizontal movement :
//movement code running in FixedUpdate function
_moveInput = Input.GetAxis("Horizontal");
_playerRB.velocity = new Vector2(_moveInput * _speed, _playerRB.velocity.y);
//jump code running in Update function
_playerRB.velocity = Vector2.up * jumpForce;
It’d be great to hear if anyone has any ideas for why this is happening and how it can be fixed.
Thanks!