title: How do I fix this 2D controller code so that my game object goes at 100% speed instantly?
body: <p>Basically I made my object in unity move around with virtual joystick, but I can't make it move at 100% instantly, it is smoothed and top speed is reached only when handle reaches the outline of the joystick. How do I remove the smoothing?</p>
  
  <p>I tried couple of things I learned from tutorials like the following code but since I am a beginner and can't think of much stuff that could help.</p>
  
  <pre><code>public float runSpeed = 5f;
  public Joystick joystick;
  Rigidbody2D rigidbody2d;
  
  
  
  // Start is called before the first frame update
  void Start()
  {
      rigidbody2d = GetComponent&lt;Rigidbody2D&gt;();
  }
  
  // Update is called once per frame
  void Update()
  {
      float horizontal = joystick.Horizontal;
      float vertical = joystick.Vertical;
  
      Vector2 move = new Vector2(horizontal, vertical);
      Vector2 position = rigidbody2d.position;
  
      if (joystick.Horizontal || joystick.Vertical &gt;= .2f)
      {
          position = position + move * runSpeed * Time.deltaTime;
      }
      else if (joystick.Horizontal || joystick.Vertical &lt;= -.2f)
      {
          position = position + move * -runSpeed * Time.deltaTime;
      }
      else
      {
          position = position + move * 0f * Time.deltaTime;
      }
  
  
      rigidbody2d.MovePosition(position);
  </code></pre>
  
  <p>Error   CS0019  Operator '||' cannot be applied to operands of type 'float' and 'bool'  Assembly-CSharp</p>