title: Collision detection 2D between rectangles
body: <p>I am writting a collision detection engine for my game and I have some problems.</p>
  
  <p>Indeed, since I have several fixed rectangle and one moving (the player), I need to know which side of the fixed one was collided at first by the player, to replace him correctly.</p>
  
  <p>The fixed rectangle are NOT in a grid so they can be placed anywhere on the map and they can have diffents size. They are not rotated.</p>
  
  <p>The player class stores it's direction vector.</p>
  
  <p>Any idea?</p>
  
  <p>KiTe</p>