Is there a way that I can use rotating while fading? #3263
-
Here is my code: text = Text("rotate while fading", height=1)
self.add(text)
self.play(
Rotating(
text,
PI / 2,
run_time=3,
about_edge=(np.array([0, 1, 0])),
axis=LEFT),
FadeOut(text)
) But it doesn't work. It just fades out without rotating. |
Beta Was this translation helpful? Give feedback.
Answered by
uwezi
Jun 8, 2023
Replies: 1 comment 2 replies
-
Ok, let's first get your rotation to work at all, currently this part alone would cause a couple of error messages: class rotfade(Scene):
def construct(self):
text = Text("rotate while fading", height=1)
self.add(text)
self.play(
Rotating(
text,
angle=PI / 2,
run_time=3,
about_edge=np.array([0, 1, 0]),
axis=LEFT,
),
) rotfade.mp4You cannot have two independent animations on the same object in a single class rotfade2(Scene):
def construct(self):
text = Text("rotate while fading", height=1)
self.add(text)
self.play(
text.animate.rotate(angle=PI/2,about_point=text.get_top(), axis=LEFT).set_opacity(0)
) rotfade2.mp4Come over to Discord to learn more about Manim and get better help: |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Stanford997
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ok, let's first get your rotation to work at all, currently this part alone would cause a couple of error messages:
rotfade.mp4
You cannot have two independent animations on the same object in a single
self.play()
because of the way the rendering engine in Manin works, but you can do it like this, using basic object modifier together with