Page 1 of 1

Best way to transfer physical objects between worlds?

Posted: Tue Jul 09, 2019 2:53 pm
by Jugbot
So my game will have at least two gamestates: the game and editor. The problem is that each requires physics and therefore I need the main player character (the thing the user will be editing) to transfer between each gamestate's world.

Since the MPC consists of bodies and joints I can't think of doing anything except storing the structure of the character as some abstract data structure and recreating it when switching gamestates and updating it when physical parts change. Or possily I can just store all bodies/joints and use them as reference to rebuild the character (hence not having to worry about keeping a data structure up-to-date).

Is this the best I can do?

Re: Best way to transfer physical objects between worlds?

Posted: Tue Jul 09, 2019 3:12 pm
by raidho36
I would suggest simply using the same physics world. But otherwise yes, you must copy over the data.