Set coordinates correctly in changeObjectVisibility().