Add function to prevent insect from going too far out of bounds.