You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a replicated multi-user A-FRAME demo using cannon.js for the physics and Croquet for networking, where each user runs an independent CANNON.World.
It works at first when everyone starts with a new CANNON.World and replicates timestepping, but when we serialize the world using cannon.serialize.js we found out it just serializes the bodies (not including stuff like velocity and inertia). We were hoping it would serialize EVERYTHING (including gravity, time, and all the other stuff) so it would replicate an exact copy of the world.
Is there a quick way to do this or will I need to go through the world's properties and manually serialize all the stuff myself?
The text was updated successfully, but these errors were encountered:
These methods are not complete but works for simple cases.
That code works for bodies only I guess, you would have to write the rest of the code if you want other properties in the json. It shouldn't be that hard.
I'm working on a replicated multi-user A-FRAME demo using cannon.js for the physics and Croquet for networking, where each user runs an independent CANNON.World.
It works at first when everyone starts with a new CANNON.World and replicates timestepping, but when we serialize the world using cannon.serialize.js we found out it just serializes the bodies (not including stuff like velocity and inertia). We were hoping it would serialize EVERYTHING (including gravity, time, and all the other stuff) so it would replicate an exact copy of the world.
Is there a quick way to do this or will I need to go through the world's properties and manually serialize all the stuff myself?
The text was updated successfully, but these errors were encountered: