Cloning / copying a body

Hi,

I'm working on a networked game using Box2D for physics simulations and RakNet (and ReplicaManager2) for the network part.

The main simulation runs on the server but the clients should compute between the synchronizations so that the animation would be smooth.
The synchronization would be quite simple because each object exists on all the clients and on the server, of course.

I just need to copy the instances stored on the server but I don't know how to do that since box2d bodies are pointers (and have private data members).
How could I get all the necessary data from a body object and how can I put that in another body object to continue computing on another machine?

Thanks
Basically, you can't. It's part of the point of factory definitions, that you use the definitions objects to create stuff. Perhaps it would be nice to be able to reverse back to definitions, but as it is, you can't.
The solution is just to keep a reference to the definitions, when you create something, via userData. Then you can pass those around instead.

Original thread: https://box2d.org/forum/viewtopic.php?t=1310