From da972edfca06c1a3792076c1c4906844649cfd11 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Tue, 24 Nov 2020 13:31:21 -0800 Subject: [PATCH] Change when camera shift happens --- manimlib/camera/camera.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manimlib/camera/camera.py b/manimlib/camera/camera.py index ae49cf3d..ec304811 100644 --- a/manimlib/camera/camera.py +++ b/manimlib/camera/camera.py @@ -46,10 +46,10 @@ class CameraFrame(Mobject): def get_inverse_camera_position_matrix(self): mat = np.identity(4) - # First shift so that origin of real space coincides with camera origin + # Shift so that origin of real space coincides with camera origin mat[:3, 3] = -self.get_center().T # Rotate based on camera orientation - mat[:3, :3] = np.dot(self.inverse_camera_rotation_matrix, mat[:3, :3]) + mat[:3, :4] = np.dot(self.inverse_camera_rotation_matrix, mat[:3, :4]) return mat def refresh_camera_rotation_matrix(self):