Skip to content

Commit

Permalink
Fixing bug in python-viewer with draw event callable argument (#1558)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanTheEngineer committed Nov 3, 2021
1 parent 756027f commit b1c5583
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def draw_event(self, simulation_call: Optional[Callable] = None) -> None:
# even if time_since_last_simulation is quite large
self.sim.step_world(1.0 / 60.0)
self.simulate_single_step = False
simulation_call()
if simulation_call:
simulation_call()

# reset time_since_last_simulation, accounting for potential overflow
self.time_since_last_simulation = math.fmod(
Expand Down

0 comments on commit b1c5583

Please sign in to comment.