moveInput = Input.GetAxisRaw("Horizontal"); if (moveInput > 0.5 || moveInput < -0.5) { rb.velocity = new Vector2(moveInput * moveSpeed, rb.velocity.y); }