I have a Virtual Environment(grid of cubes) which has the same state on both users when the application starts.
Both users have haptic devices, whose position is depicted by a small sphere in the virtual worlds.
Now If I am correct an objects state is represented by 4 values in every iteration by a physics engine position, linear velocity, orientation, orientation velocity i.e. angular velocity
Now the the object state changes when the sphere representation of haptic device(controlled by user, can move in 3d space i.e 3 degrees of freedom) collides with them.
Both users calculate different VE state every 1ms (update rate 1kHz). This is because every users gets his haptic device's latest position, and other users Haptic device's old position as it takes few ms atleast over the network (finite delay for a UDP message).
Now how do I make one users VE copy the state of the other user, but at the same time keep its physics engine on?
I have already implemented a different version, where I simply turn off the physics engine on oner user and transmit the 4 values from above via UDP periodically and user simple prediction.
How can I make the states consistent as well as user physics engine on both users?