I’m trying to render a 3D animation at the center of the screen, while keeping some other objects locked and fixed to a certain position on the screen, much like a HUD. I want to obtain something like this:
(credit to https://zerobone.net/blog/cs/linear-transformations-3d-manim/), where the matrix in the corner stays fixed, and the space rotates. I managed to do so by calling (eliding not relevant parts):
class MyScene(ThreeDScene):
def construct(self):
# [defining objects...]
mobj_group = VGroup(mobj1, mobj2)
self.play(mobj_group.animate.scale(0.3).to_corner(corner = UP + LEFT, buff = 0.3))
self.add_fixed_in_frame_mobjects(mobj_group)
but this only works if you start by creating with the object you want to fix, then fixing it, and only then rotating the camera. If I want to add a fixed object at a later point in the animation, it moves relative to the scene coordinates, not the camera ones. For example:
See the two objects in the red rectangles (added after). The graph has been fixed with add_fixed_in_frame_mobjects
BEFORE moving the camera, while the number was created and moved after. As a result, it has been moved relative to the scene axis, but how can I make it fixed in a corner of the screen, like the first graph? Thanks!