title: rigid body2D and box collider2D in unity
body: <p>Im using unity, I have a rigid body 2D and box collider2D attached to an object and a simple movement script.  The problem is due to the way the sprite was made I need to offset the box collider in order for it to line up with the sprite but when I offset the box collider and run into a wall (it is a top down game) the object starts to drift and interferes with the movement that is supposed to be happening. If I do not offset the box collider then it does not drift after running into a wall.  I have been stumped on how to fix this all night, any suggestions?</p>
  <pre><code>private Vector2 movement;
  public float moveSpeed = 4;
  public Rigidbody2D rb;
  
   private void FixedUpdate()
      {
          movement.x = Input.GetAxisRaw(&quot;Horizontal&quot;);
          movement.y = Input.GetAxisRaw(&quot;Vertical&quot;);
          movement.Normalize();
          rb.velocity = movement * moveSpeed;
      }
  </code></pre>