In my 2-dimensional physics simulation, I have a rectangular rigid body 'a' with infinite mass (the floor), and a rectangular rigid body 'b' with finite mass above it turned at a slight angle. When rigid body 'b' drops onto rigid body 'a', how do I compute the new linear and angular velocity of rigid body 'b' in an impulse-based contact resolution system?
My current implementation seems faulty because the new linear velocity $v_{new}$ of the body is computed from the old velocity $v_{old}$ of the body at the contact point $\vec r_c$. In other words, the new speed is equal to the old speed plus the perpendicular of the vector to the contact point, dot the contact normal (assuming a coefficient of restitution of 1 for all bodies involved):
$$v_{new} = v_{old} + (\vec r_c)_\bot \cdot \vec n_c$$
This seems wrong, because if rigid body 'b' is dropped onto rigid body 'a' (the floor) at an angle, rigid body 'b' bounces to the same height it had been dropped from, this time with angular velocity. Then, when it falls again, using the above-mentioned algorithm to compute the new separating velocity, rigid body 'b' bounces higher than it was dropped from. It continues this pattern until it hits the ground with so much force (because my engine lacks air drag and therefore terminal velocity) that it goes all the way through rigid body 'a'.
This algorithm seems flawed, but it also seems to be what is implemented everywhere in physics engines. Is my interpretation of these implementations wrong, and the algorithm above completely false? If so, how should I resolve contacts instead? If not, what am I missing?
Thanks in advance!
I apologize if this appears to be a programming question, but (don't tell them I said this) not everyone on StackOverflow knows physics....