ManimCommunity / manim

A community-maintained Python framework for creating mathematical animations.
https://www.manim.community
MIT License
21.85k stars 1.59k forks source link

AnimationGroup with negative z_index #3334

Open nubDotDev opened 1 year ago

nubDotDev commented 1 year ago

Description of bug / unexpected behavior

When an AnimationGroup acts on a Mobject with a negative z_index, the animation doesn't actually play.

Expected behavior

Ideally, using an AnimationGroup should work. It did with a previous stable version so this must be a recent bug.

How to reproduce the issue

Code for reproducing the problem ```py class Test(Scene): def construct(self): s = Square().set_z_index(-1) self.play(GrowFromCenter(s)) # Works great self.wait() self.play(AnimationGroup(GrowFromCenter(s))) # Doesn't work self.wait() ```

Additional media files

Images/GIFs ![Test_ManimCE_v0 17 3](https://github.com/ManimCommunity/manim/assets/41497304/d92ccacb-bd0d-4598-bc9b-45315fed05ef)
vaclavblazej commented 1 year ago

I can confirm that this is indeed the current behavior. First version that exhibits it is 0.15.1:

0.15.1 behavior video https://github.com/ManimCommunity/manim/assets/6208643/9825b777-9994-4504-938e-19bde736e5c8

The same code behaves in 0.15.0 as follows:

0.15.0 behavior video https://github.com/ManimCommunity/manim/assets/6208643/33a44831-1727-4460-a708-1e67bba54972