Prevent character from hitting a solid block.