File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -404,9 +404,7 @@ def __init__(self,
404404 self ._options = options
405405
406406 self ._camera = wrapper .MjvCamera ()
407- self ._camera .trackbodyid = _NO_BODY_TRACKED_INDEX
408- self ._camera .fixedcamid = _FREE_CAMERA_INDEX
409- self ._camera .type_ = mujoco .mjtCamera .mjCAMERA_FREE
407+ self .set_freelook_mode ()
410408 self ._zoom_factor = zoom_factor
411409 self ._scene_callback = scene_callback
412410
@@ -421,6 +419,7 @@ def set_freelook_mode(self):
421419 self ._camera .trackbodyid = _NO_BODY_TRACKED_INDEX
422420 self ._camera .fixedcamid = _FREE_CAMERA_INDEX
423421 self ._camera .type_ = mujoco .mjtCamera .mjCAMERA_FREE
422+ mujoco .mjv_defaultFreeCamera (self ._model .ptr , self ._camera .ptr )
424423
425424 def set_tracking_mode (self , body_id ):
426425 """Latches the camera onto the specified body.
You can’t perform that action at this time.
0 commit comments