This project has moved. For the latest updates, please go here.

I have a question regarding multiple physics worlds.

Jan 2, 2011 at 2:29 AM

Alright so:

Essentially I've organized my game engine by having a GameWorld and an entity object. Each world object corresponds a FareseerPhysics world object. This works out fine but I get a problem when I have to be able to attach & dettach entity objects(which hold & managed FarseePhysic's joints and fixutres) between worlds. AFAIK I cannot transfer a fixture from FarseerPhysics World A to FarseerPhysics world B.

Sorry if I've missed something, I'm new to the engine.

Jan 2, 2011 at 2:35 AM
You need to remove the body and attached fixtures from the World and
recreate it in the other World.

Bodies have a strong reference to the World they har been created in.
So you need to recreate them in the other World.
Jan 2, 2011 at 2:39 AM

I had a feeling I might have to do that; I just wanted to make sure there weren't any other ways of doing it.


Thanks a lot for your help :)