-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
issue:bugSomething isn't working... For use in issuesSomething isn't working... For use in issues
Description
How can I hide mobjects to the back when overlapping with other in 3D Scenes? Unless I'm doing something wrong, self.add_foreground_mobjects, self.bring_to_back and self.bring_to_front doesn't work.
How to reproduce the issue
class test(ThreeDScene):
def construct(self):
axes = ThreeDAxes()
cir = Circle(radius = 0.5).move_to([-5,-5,0]).set_color("#FEFFAF")
sphere = ParametricSurface(
lambda u, v: np.array([
2*np.cos(u)*np.cos(v),
2*np.cos(u)*np.sin(v),
2*np.sin(u)
]), v_min=0, v_max=2*PI, u_min=-PI/2, u_max=PI/2, fill_opacity = 1.0,
checkerboard_colors=[RED_D], resolution=(6, 16), stroke_color = RED_D
)
self.set_camera_orientation(phi=75 * DEGREES, theta=30 * DEGREES)
self.bring_to_back(cir)
self.bring_to_front(sphere)
self.add_foreground_mobjects(sphere)
self.add(axes)
self.add(cir)
self.add(sphere)
self.wait(1)
Output:
Metadata
Metadata
Assignees
Labels
issue:bugSomething isn't working... For use in issuesSomething isn't working... For use in issues
