Dashcam footage has showed the moment a car was rear-ended and sent flying into an oncoming truck.