MoveToTarget#

Qualified name: manim.animation.transform.MoveToTarget

class MoveToTarget(mobject=None, *args, use_override=True, **kwargs)[source]#

Bases: manim.animation.transform.Transform

Transforms a mobject to the mobject stored in its target attribute.

After calling the generate_target() method, the target attribute of the mobject is populated with a copy of it. After modifying the attribute, playing the MoveToTarget animation transforms the original mobject into the modified one stored in the target attribute.

Examples

Example: MoveToTargetExample

from manim import *

class MoveToTargetExample(Scene):
    def construct(self):
        c = Circle()

        c.generate_target()
        c.target.set_fill(color=GREEN, opacity=0.5)
        c.target.shift(2*RIGHT + UP).scale(0.5)

        self.add(c)
        self.play(MoveToTarget(c))

Methods

check_validity_of_input

Attributes

path_arc

path_func