title: Unity: Game Object cannot move to right for the first time I press right arrow of keyboard
body: <p><strong>Update:</strong> after go further with this book, I get the reason. It is the box colliders limitation of Unity it said in book. So I think we could close this ticket.</p>
  
  <p>What said in the book:</p>
  
  <p>"Right now, if you’re using box colliders on your tiles and on your player character, you might find that
  you occasionally get stuck on things that you shouldn’t—your character may stop moving and press against
  thin air. The problem normally occurs at the vertices between the closely positioned tiles, and unfortunately,
  it seems that this is a slight issue with Unity itself rather than anything you can fix (apparently, it was
  introduced in 4.3.1 and has yet to be resolved as of the time of writing).
  If you do encounter this problem, just try using a polygon collider for Squarey himself, changing the
  shape slightly by clicking Edit Collider, and then creating a small bump in the outline as in Figure 5-9 so that
  you can “slide” over these imagined obstacles."</p>
  
  <p>Following a book, I create a simple game using Unity 2D. It includes a <code>GameObject</code> named 'Player' which could do some simply action, move to left/right/jump when pressing <kbd>leftArrow</kbd>/<kbd>rightArrow</kbd>/<kbd>Space</kbd> key of my PC. And also some tiles as platform ground.</p>
  
  <p>I found a problem that when the game is played, firstly the Player will drop on the platform then when I press <kbd>Right Arrow</kbd> Key, it has no effect. But if I press <kbd>Left</kbd> Key or <kbd>Space</kbd>, the Player will go left or jump then the <kbd>Right</kbd> Click will take effect...</p>
  
  <p>This problem takes me for hours! 
  Searching the internet but no answer found. One clue I found is that when I uncheck the <code>Freeze Rotation</code> option under <code>RigidBody2D</code>, then right move worked but I don't know why yet.</p>
  
  <p><a href="https://i.stack.imgur.com/nMVb8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nMVb8.png" alt="Issue1_000"></a></p>
  
  <p><a href="https://i.stack.imgur.com/FJusj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FJusj.png" alt="Issue1_001"></a></p>
  
  <p>Here is my code, guys your help will be appreciated!</p>
  
  <pre class="lang-c# prettyprint-override"><code>using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class Player : MonoBehaviour
  {
  
      public Rigidbody2D rb;
      public int moveSpeed;
      public int jumppower;
      public Transform groundCheck;
      public float groundCheckRadius;
      public LayerMask whatIsGround;
      private bool onGround;
  
  
      // Use this for initialization
      void Start()
      {
          rb = GetComponent&lt;Rigidbody2D&gt;();
      }
  
      private void FixedUpdate()
      {
          onGround = Physics2D.OverlapCircle(groundCheck.position, groundCheckRadius,
              whatIsGround);
      }
  
      // Update is called once per frame
      void Update()
      {
          if (Input.GetKey(KeyCode.LeftArrow))
          {
              rb.velocity = new Vector2(-moveSpeed, rb.velocity.y);
          }
          if (Input.GetKey(KeyCode.RightArrow))
          {
              rb.velocity = new Vector2(moveSpeed, rb.velocity.y);
          }
  
          if (Input.GetKey(KeyCode.Space) &amp;&amp; onGround)
          {
              rb.velocity = new Vector2(rb.velocity.x, jumppower);
          }
      }
  }
  </code></pre>