Hi,
I have started implementing bullet physics into a multiplayer game (liking it so far ), until now we had implementation using PAL (with physx) and i did the fixed time steps myself, i see that bullet actually has the fixed time steps and does interpolation by default. That brings me to my question, is it possible to get the non interpolated transformation data? (which would be used for selective network sync)
Getting non interpolated transformations
-
- Posts: 145
- Joined: Tue Oct 30, 2007 9:23 pm
Re: Getting non interpolated transformations
Of course.
To get the transform of a body, just do btTransform t = mRigidBody->getWorldTransform(). Bullet does interpolation, but all the interpolation happens through motionstates. In short:
1) To get the interpolated stuff, use a motionstate
2) To get non-interpolated stuff, query the body directly
Gary (-;
To get the transform of a body, just do btTransform t = mRigidBody->getWorldTransform(). Bullet does interpolation, but all the interpolation happens through motionstates. In short:
1) To get the interpolated stuff, use a motionstate
2) To get non-interpolated stuff, query the body directly
Gary (-;
-
- Posts: 508
- Joined: Fri May 30, 2008 2:51 am
- Location: Ossining, New York
Re: Getting non interpolated transformations
You can also get non-interpolated motion through the motion states if you pass in an external timestep that is an integer multiple of the internal timestep, i.e. crimping the delta time yourself.