Enable simulation stepping from script
Posted: Thu May 29, 2014 1:23 pm
I've noticed that there isn't a way to step the simulation directly from the script. There is no reference to such a function in the help, and when I check out the logs to see what happens when I step the simulation, I just calls translate and rotate commands on all the selected bodies to place them in their final position after stepping.
I would like to be able to call a step function with the signature
where simSpeed is a variable that acts like the speed control in the player (i.e. <1.0 for slower than normal, and >1.0 for faster than normal).
If this is enabled, I can use a rubescript and a sampler to create a series of images of the a simulation (using a sampler), without the hassle of trying to record a gif of the player running. Then I can use some other program to compile those images into a gif/video for a nice clean demonstration.
The problem is, when I record a gif from the player, my cpu gets bogged down trying to do the sim and recording at once, and the frame rate starts to get choppy, making for poor video quality. This solution would sidestep that issue.
I would like to be able to call a step function with the signature
Code: Select all
void step(body[] bodiesToStep, uint numSteps, float simSpeed = 1.0)
If this is enabled, I can use a rubescript and a sampler to create a series of images of the a simulation (using a sampler), without the hassle of trying to record a gif of the player running. Then I can use some other program to compile those images into a gif/video for a nice clean demonstration.
The problem is, when I record a gif from the player, my cpu gets bogged down trying to do the sim and recording at once, and the frame rate starts to get choppy, making for poor video quality. This solution would sidestep that issue.