diff --git a/mani_skill2/envs/sapien_env.py b/mani_skill2/envs/sapien_env.py index 08392484e..35c2b3c7b 100644 --- a/mani_skill2/envs/sapien_env.py +++ b/mani_skill2/envs/sapien_env.py @@ -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: