manim 中的 TracedPath 问题

Issue with TracedPath in manim

我正在尝试使用 TracedPath 在 manim (CE v0.10) 中制作曲线,然后我想对其进行操作(四处移动、旋转等)。问题是,一旦我开始移动曲线并且我不希望它移动,跟踪就会继续。有谁知道如何关闭跟踪?任何帮助将不胜感激(这是我完成视频需要解决的最后一个问题)。这是一些示例代码:

class TracedPathProblem(Scene):
    def construct(self):
        dot = Dot(color=RED)
        trace = TracedPath(dot.get_center,stroke_color=RED)
        self.add(dot,trace)
        self.play(dot.animate.shift(RIGHT),run_time=2)
        path = trace.copy()
        self.play(path.animate.shift(2*UP+RIGHT)) #do not want tracing here
        self.wait()

问题已解决。 Benjamin Hackl 给了我一个解决方案:path = trace.copy().clear_updaters()