Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updaters get passed wrong mobject during _AnimationBuilder animations #1536

Open
AntonBallmaier opened this issue May 17, 2021 · 1 comment
Labels
issue:bug Something isn't working... For use in issues

Comments

@AntonBallmaier
Copy link
Contributor

Description of bug / unexpected behavior

Updaters attached to mobjects animated via the .animate property get passed the wrong mobject during that animation:

class AnimateBugTest(Scene):
    def construct(self):
        line = Line(UP * 3, DOWN * 3).align_on_border(LEFT)
        dot1 = Dot(color=RED)
        dot2 = Dot(color=GREEN)
        self.add(line, dot1, dot2)

        line.add_updater(lambda mob: dot1.move_to(mob))
        dot2.add_updater(lambda mob: mob.move_to(line))

        # Animate Line
        self.play(line.animate.align_on_border(RIGHT), run_time=5)
        self.wait()
AnimateBugTest.mp4

Expected behavior

The green dot should behave like the red one.

@AntonBallmaier AntonBallmaier added the issue:bug Something isn't working... For use in issues label May 17, 2021
@AntonBallmaier AntonBallmaier changed the title Updaters get passed wrong mobject during _AnimationBuilder aniamtions Updaters get passed wrong mobject during _AnimationBuilder animations May 17, 2021
@JoelGotsch
Copy link

I would argue that is not a bug, but wrong usage of updaters. Adding an updater line can only animate line, not dot1.

@MrDiver MrDiver moved this to 🆕 New in Dev Board Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue:bug Something isn't working... For use in issues
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants