Fixed a bug which the player can only trigger the events by colliding
with the object form top and bottom but not from left and right.