# How to move a body from one world to another?

I have a Box2D world for each level in my game. When a level is completed, I want the player to be removed from the completed level's world and added to the next level's world. How do I do this?

I would start here ...

http://www.iforce2d.net/b2dtut/removing-bodies

Then end with a sprinkling of ...

http://www.iforce2d.net/b2dtut/bodies

I'm guessing the latter you already did, so essentially you are just doing the first part in reverse.

• Does that mean that I have to destroy the body and re-create it in order to use it in a new World? It seems a tad inefficient that way to say the least. – manabreak Sep 18 '14 at 12:04
• That's usually how physics engines work ... you can add things and remove things but its generally hard to get hold of a part of the world. That said ... this is C++ ... i live in a c# world so maybe you can somehow geta pointer and move that over to the new world somehow. I've never seen that though. – War Sep 18 '14 at 12:07
• hmmm ... how about something like this ... gamedev.stackexchange.com/questions/27113/… – War Sep 18 '14 at 12:08
• looks like in the solution he gets a ref to the body ... so you just need to pass that to your new world right? – War Sep 18 '14 at 12:08
• The thing is, there's no way to pass a reference. There's no AddBody() function - just a CreateBody(). – manabreak Sep 18 '14 at 12:11