Open AntonBallmaier opened 3 years ago
Updaters attached to mobjects animated via the .animate property get passed the wrong mobject during that animation:
.animate
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()
https://user-images.githubusercontent.com/26899845/118537082-ca0a4400-b74c-11eb-9a0c-633e02413a01.mp4
The green dot should behave like the red one.
I would argue that is not a bug, but wrong usage of updaters. Adding an updater line can only animate line, not dot1.
Description of bug / unexpected behavior
Updaters attached to mobjects animated via the
.animate
property get passed the wrong mobject during that animation:https://user-images.githubusercontent.com/26899845/118537082-ca0a4400-b74c-11eb-9a0c-633e02413a01.mp4
Expected behavior
The green dot should behave like the red one.