Two examples of how collisions are resolved by computing appropriate constraint impulses that change the linear and angular velocity of the involved bodies. First row: a body falls onto a ramp. An impulse vector (red), standing orthogonally on the penetrated surface, is applied to the cube's velocity (weighted by its mass). This leads to a change in its linear (
) and angular (
) velocity. The second impulse (blue; same magnitude, opposite direction) is applied to the ramp but assuming the ramp has infinite mass, it has no effect. In the second row, the same scenario with a different ramp is depicted. Here, the computed constraint impulse again counteracts penetration, but due to the angle of penetration, the cube now rotates into the opposite direction. This behavior is counter-intuitive, and can be avoided by adding friction constraints. However, without friction, it makes sense: think of both the ramp and the cube as blocks of slippery ice, then the simulated response makes more sense.