     hitBoxJS.touching.bottom = hits.bottom.length > 0
     hitBoxJS.touchingSomething = hitBoxJS.touching.left or hitBoxJS.touching.right or hitBoxJS.touching.top or hitBoxJS.touching.bottom
 
+    hitBoxJS.adjacent = {}
+    hitBoxJS.adjacent.top = adjacent.top.length > 0
+    hitBoxJS.adjacent.bottom = adjacent.bottom.length > 0
+    hitBoxJS.adjacent.left = adjacent.left.length > 0
+    hitBoxJS.adjacent.right = adjacent.right.length > 0
+
     @updateComp hitBox.merge(hitBoxJS)
 
     # Update velocity if needed based on running into objects:

    if hits.left.length > 0
      s = hits.left[0]
      box.setX(s.x+s.width - box.leftOffset)
    else
      hits.right = tileSearchVertical(grid, tileWidth,tileHeight,box.right, box.top, box.bottom-1)
      if hits.right.length > 0
        s = hits.right[0]
        box.setX(s.x - box.rightOffset)
    
    # Update position and hit_box components 
    @updateComp position.set('x', box.x).set('y', box.y)

    if hits.top.length > 0
      s = hits.top[0]
      box.setY(s.y+s.height - box.topOffset)
      adjacent.top = hits.top
    else
      hits.bottom = tileSearchHorizontal(grid, tileWidth,tileHeight,Math.ceil(box.bottom), box.left, box.right-1)
      if hits.bottom.length > 0
        s = hits.bottom[0]
        box.setY(s.y - box.bottomOffset-1)
        adjacent.bottom = hits.bottom

    unless adjacent.top?
      adjacent.top = tileSearchHorizontal(grid, tileWidth,tileHeight, box.top-1, box.left, box.right-1)
    unless adjacent.bottom?
      adjacent.bottom = tileSearchHorizontal(grid, tileWidth,tileHeight,Math.ceil(box.bottom+1), box.left, box.right-1)


    # Step 2: apply & restrict horizontal movement
    box.moveX(vx * @dt())
