how can i lower the speed of the current simulation in a lua script (i do not want to slow the whole simulation down, but part of it. i want to start with default speed, then slow down and get back to the default simulation speed (50ms)).
I tried to decrease the simulation step time dt as shown:
Btw I don't think you can change it during simulation, so you'll have to perform one simulation with a time step, then save the state (pos, vel, etc) of all objects, stop the simulation, set the state of all objects, set the time step, and start the simulation to run the second part of the simulation with a smaller time step.
I want to reach the same functionality programmatically like the two toolbar-buttons (turtle/minus - rabbit/plus) in the simulation menu bar do.
Here it is possible to change the whole simulation speed by decreasing/increasing the simulation step time on one hand or by increasing/decreasing the simulation passes during one rendering pass. This can by done while the simulation is running.