diff --git a/python/mujoco/viewer.py b/python/mujoco/viewer.py index 48ad9405..61520240 100644 --- a/python/mujoco/viewer.py +++ b/python/mujoco/viewer.py @@ -300,7 +300,7 @@ def _physics_loop(simulate: _Simulate, loader: Optional[_InternalLoaderType]): # Run mj_forward, to update rendering and joint sliders. mujoco.mj_forward(m, d) - synccpu = time.time() + simulate.speed_changed = True def _launch_internal( diff --git a/simulate/main.cc b/simulate/main.cc index 5ccc3ee6..71aad17d 100644 --- a/simulate/main.cc +++ b/simulate/main.cc @@ -400,7 +400,7 @@ void PhysicsLoop(mj::Simulate& sim) { else { // run mj_forward, to update rendering and joint sliders mj_forward(m, d); - syncCPU = mj::Simulate::Clock::now(); + sim.speed_changed = true; } } } // release std::lock_guard