bullet3 icon indicating copy to clipboard operation
bullet3 copied to clipboard

Clarification on stepSimulation method behavior

Open TariqYoussef opened this issue 1 year ago • 0 comments

I was reading the Bullet Physics manual and noticed the following statement regarding the stepSimulation method: "To decouple the application framerate from the simulation framerate, an automatic interpolation method is built into stepSimulation: when the application delta time is smaller than the internal fixed timestep, Bullet will interpolate the world transform, and send the interpolated worldtransform to the btMotionState, without performing physics simulation."

From the manual, it seems that the stepSimulation method can be called every frame and that the method will use interpolation to smoothly animate the rigid bodies, without performing physics simulation if the delta time is smaller than the internal fixed timestep.

However, I noticed that when the delta time is smaller than the internal fixed timestep, the method still clears all forces applied to every rigidbody. This causes issues with applying forces to rigidbodies, since they are not affected by the force if the delta time happens to be smaller than the internal fixed timestep.

Can you clarify if this behavior is intended?

Thanks!

TariqYoussef avatar Apr 19 '23 11:04 TariqYoussef