Skip to content

Commit

Permalink
fix bipedal rgb_array shape (openai#3083)
Browse files Browse the repository at this point in the history
  • Loading branch information
younik authored Sep 11, 2022
1 parent f4d668f commit cae736b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gym/envs/box2d/bipedal_walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,9 @@ def render(self):
if self.clock is None:
self.clock = pygame.time.Clock()

self.surf = pygame.Surface((VIEWPORT_W + self.scroll * SCALE, VIEWPORT_H))
self.surf = pygame.Surface(
(VIEWPORT_W + max(0.0, self.scroll) * SCALE, VIEWPORT_H)
)

pygame.transform.scale(self.surf, (SCALE, SCALE))

Expand Down

0 comments on commit cae736b

Please sign in to comment.