mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Slightly cleaner treatment of pi creature automatically tracking animations
This commit is contained in:
parent
15e5969eed
commit
4089a5a949
1 changed files with 11 additions and 12 deletions
|
@ -526,7 +526,6 @@ class PiCreatureScene(Scene):
|
|||
lambda anim : pi_creature in anim.mobject.submobject_family(),
|
||||
animations
|
||||
)
|
||||
if anims_with_pi_creature:
|
||||
for anim in anims_with_pi_creature:
|
||||
if isinstance(anim, Transform):
|
||||
index = anim.mobject.submobject_family().index(pi_creature)
|
||||
|
@ -534,7 +533,7 @@ class PiCreatureScene(Scene):
|
|||
target = target_family[index]
|
||||
if isinstance(target, PiCreature):
|
||||
target.look_at(point_of_interest)
|
||||
continue
|
||||
if not anims_with_pi_creature:
|
||||
animations.append(
|
||||
ApplyMethod(pi_creature.look_at, point_of_interest)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue