In this paper, we describe the concept and implementation of a dynamics filter, an online, full-body motion generator that converts a physically infeasible reference motion into a feasible one for the given human figure. Our implementation of the dynamics filter only uses time-local information, that is, does not require the whole motion sequence in advance. Therefore, the reference motion may be changed online in response to the interaction with a human or the environment. The dynamics filter is implemented based on an efficient rigid-body collision/contact model. This model itself provides an efficient algorithm for dynamics simulation of collisions and contacts. We demonstrate the power of the dynamics filter by several example motions that use motion capture data as a reference.