Closed TheCrowned closed 5 months ago
I believe you need to supply us with more context, because the following code just works fine:
class align(Scene):
def construct(self):
a = Square()
b = Circle().move_to(RIGHT*3) # so they're not on top of each other
self.add(a,b)
self.wait()
self.play(b.animate.align_to(a, LEFT))
self.wait()
self.play(b.animate.move_to(RIGHT*2))
self.wait()
self.play(b.animate.align_to(a, LEFT))
self.wait()
https://github.com/ManimCommunity/manim/assets/8582807/19c86ce5-494a-42ee-a2a7-9ce9afd4661a
so does this static code
class align2(Scene):
def construct(self):
a = Square()
b = Circle().move_to(RIGHT*3) # so they're not on top of each other
b.align_to(a, LEFT)
b.move_to(RIGHT*2)
b.align_to(a, LEFT)
self.add(a,b)
Alright, then it must be something with my particular animation. It's a long chain with other elements. I'll close for now.
If I align an object to another with
align_to
, then move it somewhere else withmove_to
, and finally re-align it to the same initial object withalign_to
, the last call has no effect.Running Manim 0.18.0.