Combining moving targets and moving obstacles in a locomotion model