Hi everyone,
I'm writing a server/client game, both server and client use Bullet physics.
My server has the 'real' world, and it sends this world to clients. When clients update the server, they send to the server their direction of movement. When the server receives this message, a certain amount of time has already passed since the message was created and sent (lag).
What I'd like to do is for the server to rewind the client to the previous known location of the last frame (easy), change it's velocity/apply forces, and then stepSimulation() only for that object with the time that passed.
Is this something that can be achieved using Bullet? Can anyone direct me to the API to achieve that?
Thanks in advance,
Mike
correcting client movements
-
- Posts: 1
- Joined: Mon Jun 10, 2013 11:48 am
Re: correcting client movements
Hi,
I'm trying to do something similar.
You mentioned saving and restoring the state is easy.
Could you please tell me which functions you use to do that?
I tried get/setLinearVelocity()
get/setAngularVelocity()
and
get/setWorldTransform()
but without any luck
unfortunately I can't help you with your problem sorry
(I imagine stepping a single object is not possible because a collision would have to update the other one too)
I'm trying to do something similar.
You mentioned saving and restoring the state is easy.
Could you please tell me which functions you use to do that?
I tried get/setLinearVelocity()
get/setAngularVelocity()
and
get/setWorldTransform()
but without any luck

unfortunately I can't help you with your problem sorry
