DJElectric
DJElectric

Reputation: 359

Issue with TracedPath in manim

I'm trying to use TracedPath to make a curve in manim (CE v0.10), which I then want to manipulate (move around, rotate, etc.). The problem is, the tracing continues once I start moving the curve and I don't want it to. Does anyone know how to turn the tracing off? Any help would be greatly appreciated (this is the last issue I need to solve to finish my video). Here is some sample code:

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()

Upvotes: 0

Views: 584

Answers (1)

DJElectric
DJElectric

Reputation: 359

Issue solved. Benjamin Hackl gave me a solution: path = trace.copy().clear_updaters()

Upvotes: 0

Related Questions