Text this: Kinematic contact-impact algorithm with friction