Skip to content

Commit

Permalink
fix bug where viewer camera was fixed in place to a sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneT2000 committed Feb 26, 2024
1 parent 9a9f311 commit 1683a01
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mani_skill2/envs/sapien_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,15 +956,16 @@ def _setup_viewer(self):
)
control_window.show_joint_axes = False
control_window.show_camera_linesets = False
if "render_camera" in self._human_render_cameras:
self._viewer.set_camera_pose(
self._human_render_cameras["render_camera"].camera.global_pose
)

def render_human(self):
if self._viewer is None:
self._viewer = Viewer()
self._setup_viewer()
if "render_camera" in self._human_render_cameras:
self._viewer.set_camera_pose(
self._human_render_cameras["render_camera"].camera.global_pose
)

for obj in self._hidden_objects:
obj.show_visual()
if physx.is_gpu_enabled() and self._scene._gpu_sim_initialized:
Expand Down

0 comments on commit 1683a01

Please sign in to comment.