Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sc2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ async def move_camera(self, position: Unit | Units | Point2 | Point3) -> None:
)
)

async def obs_move_camera(self, position: Unit | Units | Point2 | Point3) -> None:
async def obs_move_camera(self, position: Unit | Units | Point2 | Point3, distance: float = 0) -> None:
"""Moves observer camera to the target position. Only works when observing (e.g. watching the replay).

:param position:"""
Expand All @@ -444,7 +444,9 @@ async def obs_move_camera(self, position: Unit | Units | Point2 | Point3) -> Non
await self._execute(
obs_action=sc_pb.RequestObserverAction(
actions=[
sc_pb.ObserverAction(camera_move=sc_pb.ActionObserverCameraMove(world_pos=position.as_Point2D))
sc_pb.ObserverAction(
camera_move=sc_pb.ActionObserverCameraMove(world_pos=position.as_Point2D, distance=distance)
)
]
)
)
Expand Down
Loading