Normally, during a truck-car collision, there is a net external force exerted on the system due to the friction force of the ground on the vehicles. However, this force is relatively small compared to the internal forces of the vehicles on each other. We can use momentum conservation for the short time during the collision. For this particular simulation, there is no friction. So momentum is conserved--the sum of the x components of momentum of objects in the system is constant, as is the sum of the y components. For two-object systems
Momentum Before = Momentum After
mtruckvtruck ox + mcarvcar
ox = mtruckvtruck x + mcarvcar
x
and
mtruckvtruck oy + mcarvcar
oy = mtruckvtruck y + mcarvcar
y