More work on physics simulator.