I'm currently writing a game in which you control a little
character with a gun. But I was wondering how I could detect wether or not the character is standing next to a wall. Right now, the character runs through the wall. I've used the div function to check the sector next to the character to see if its blank, however, the character can move into the next sector before he is "in" the next sector and thus is drawn half way in the wall. How can I detect if the character can walk to the right or left?