Using interpolated states with external timesteps
Posted: Mon Jan 09, 2012 6:05 pm
I know I can use Space.Update(float dt) to let BEPU handle proper timesteps internally and can afterwards access interpolated state with the BufferedStates.InterpolatedStates properties. However, I'd like to handle timesteps myself outside BEPU (e.g. to collect input for each physics timestep) and will use Space.Update() to calculate each physics step individually.
Can I still use the interpolated states then? I've already seen the Space.BufferedStates.InterpolatedStates.BlendAmount property and guess I'll just need to set that manually (and enable BufferedStates and InterpolatedStates). E.g. if I simulate a new physics step for every 16ms (60fps) and I've got 8ms remaining in my frametime accumulator, I'll simply set BlendAmount to 0.5 and can safely use the interpolated states for rendering!?
Can I still use the interpolated states then? I've already seen the Space.BufferedStates.InterpolatedStates.BlendAmount property and guess I'll just need to set that manually (and enable BufferedStates and InterpolatedStates). E.g. if I simulate a new physics step for every 16ms (60fps) and I've got 8ms remaining in my frametime accumulator, I'll simply set BlendAmount to 0.5 and can safely use the interpolated states for rendering!?