def play_motion_path(self, points, point_duration=1.2):
        """ Plays a motion path from the given set of points """
        fitter = CurveFitter()
        for i, (pos, hpr) in enumerate(points):
            fitter.add_xyz_hpr(i, pos, hpr)

        fitter.compute_tangents(1.0)
        curve = fitter.make_hermite()
        print("Starting motion path with", len(points), "CVs")

        self.showbase.render2d.hide()
        self.showbase.aspect2d.hide()

        self.curve = curve
        self.curve_time_start = self.clock_obj.get_frame_time()
        self.curve_time_end = self.clock_obj.get_frame_time() + len(points) * point_duration
        self.delta_time_sum = 0.0
        self.delta_time_count = 0
        self.showbase.addTask(self.camera_motion_update, "RP_CameraMotionPath", sort=-50)
        self.showbase.taskMgr.remove(self.update_task)
 Plays a motion path from the given set of points 
metadrive/render_pipeline/rpcore/util/movement_controller.py