public void bottom(Entity entity, editor.MapComponent map){
/*
* calculate which tile the bottom of entity is in
*/
map.rowIndex = (int) ((entity.Y + entity.Height ) / map.tileHeight); // find the row bottom of entity is in
for (float x = (entity.X); x <= ((entity.X) + entity.Width); x += map.tileWidth){ // check each column the bottom of the entity is in
map.columnIndex = (int) (x / map.tileWidth); // the (int) casts the entity.x float into an int so I can do the calculation
map.selectedTile = map.map[map.rowIndex][map.columnIndex];
if( map.selectedTile == 1){// tile is unwalkable collision is true
entity.collision[0] = 1;
}
}
//check the bottom right column entity is in
map.columnIndex = (int) (( (entity.X ) + entity.Width) / map.tileWidth);
map.selectedTile = map.map[map.rowIndex][map.columnIndex];
if( map.selectedTile == 1){
entity.collision[0] = 1;
}
}
Some where my code is picking up collision on both the horizontal and verticle movement, when it should only be one of the other if my code has moved him correctly.

Find content
Not Telling