A baseball player swings his bat to hit a traveling baseball .