I finished the tutorial for dodge block but now i want to convert the player movement from pc to mobile, how can i achieve this, below is the following code of how the player moves
*This player movement is very very smooth on pc, so i’m looking for the same smoothness once converted to mobile*
float x = Input.GetAxis(“Horizontal”) * Time.fixedDeltaTime * speed;
Vector2 newPos = rb.position + Vector2.right * x;
newPos.x = Mathf.Clamp(newPos.x, -mapWidth, mapWidth); rb.MovePosition(newPos);
Thanks!