Page 1 of 1

how to perform a 'bullet time fx'

Posted: Sat May 26, 2012 12:22 am
by coimbra79
hi!
i need to perform a bullet time effect , for major accuracy in some hard action, to semplify some level in my app.
i'm tried decreasing the time step duration, but the physics is altered causing an undesirable effect...
wath the way?

Re: how to perform a 'bullet time fx'

Posted: Sat May 26, 2012 12:34 am
by Norbo
If you are using Space.Update(dt), scale dt by the desired slowdown. That is, if you want to run at 10% speed, multiply dt by 0.1f. This works because Space.Update(dt) takes however many steps of length Space.TimeStepSettings.TimeStepDuration are necessary to reach the accumulated time. By passing in less time, less time accumulates and less time steps run. However, this does not change the simulation accuracy at all.

If you find additional accuracy is required, decrease the Space.TimeStepSettings.TimeStepDuration. So, if you want to run at 10% speed, use Space.Update(dt * 0.1f) as before, and also set the Space.TimeStepSettings.TimeStepDuration = normalTimeStep * 0.1f. ('normalTimeStep' would be equal to 1/60f by default.)

If you are using Space.Update() without parameters, each Update call performs one time step. So, shrinking Space.TimeStepSettings.TimeStepDuration by the factor would do the trick.

Beware that constantly changing the time step duration can make the simulation harder to handle for the engine. Doing it once every once in a while shouldn't be a problem though.

Re: how to perform a 'bullet time fx'

Posted: Sat May 26, 2012 1:04 am
by coimbra79
clack!
NICE NORBO!
so to perform a real 'bullet time fx' i have to decrease timestepduration & the td parameter when update the space...
Work too coolly!
tank!