A Godunov scheme is proposed for the simulation of impact problems and detonations where nonstationary fronts and interfaces are tracked as boundaries of subregions that move in time. In each subregion and at each time step, a new grid is created by the use of boundary-fitted coordinates. The numerical method is based on a finite-volume approach in the space-time domain, and the fluxes are calculated using the solution of Riemann problems. Numerical results are shown for several impact and detonation problems, showing the efficiency of this approach.