mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Fix panning for off-center frame
This commit is contained in:
parent
e58aea9e2f
commit
abdcb64461
1 changed files with 1 additions and 1 deletions
|
@ -814,7 +814,7 @@ class Scene(object):
|
|||
frame = self.camera.frame
|
||||
# Handle perspective changes
|
||||
if self.window.is_key_pressed(ord(PAN_3D_KEY)):
|
||||
ff_d_point = frame.to_fixed_frame_point(d_point)
|
||||
ff_d_point = np.dot(d_point, frame.get_view_matrix()[:3, :3].T)
|
||||
ff_d_point *= self.pan_sensitivity
|
||||
frame.increment_theta(-ff_d_point[0])
|
||||
frame.increment_phi(ff_d_point[1])
|
||||
|
|
Loading…
Add table
Reference in a new issue