Open ajktym94 opened 10 months ago
Can you share a reproducible code
@saurabheights I was working on a reproducible code and meanwhile I came to a point where it looks like this is a problem with the look_at()
parameters. Do you know what exactly is excepted as parameters here? I am playing with values according to my intuition now.
Documentation says it expects (centre, eye, up) but I do not fully understand what exactly is needed.
I had the same issue. There seems to be a disagreement about the camera's center of rotation, i.e. where the scene will rotate about when moving the camera.
I fixed the issue by explicitly setting the center of rotation to match the centre argument from look_at()
centre = [x, y, z] # fill in desired center of rotation
self.widget3d.scene.camera.look_at(centre, eye, up)
self.widget3d.center_of_rotation = centre
See open3d.visualization.gui.SceneWidget.center_of_rotation
Interestingly, setting the centre of rotation via SceneWidget.setup_camera()
does not fix the issue.
Checklist
master
branch).My Question
I have a pointcloud which I am visualizing using
SceneWidget()
. After loading it, I change the camera position usingself.widget3d.scene.camera.look_at()
to get my desired view. Now if I try to rotate the pointcloud using Left click + drag, the pointcloud initially shifts it's position to the left by a considerable amount and then continues rotating. I do not want it to shift. What can be done to avoid this?