In dynamic environment, the suddenly appeared human or other moving obstacles can affect the safety of the bridge crane. For such dangerous situation, the bridge crane must predict potential collisions between the payload and the obstacle, keep safe distance while the swing of the payload must be considered in the mean time. Therefore, the safe distance is not a constant value, which must be adaptive to the relative speed of the bridge crane. However, as far as we know, the mathematical model between the safe distance and the relative speed of the bridge crane has never been fully discussed. In this paper, we propose a safe distance prediction method using model prediction control (MPC), which can make sure that the crane can stop before the obstacle, and avoid possible collisions, while the relative speed and anti-swing are both considered. The experimental results prove the effectiveness of our idea.