Correct way to suspend Space / clean up entities?
Posted: Mon May 16, 2011 11:56 am
On the windows phone platform / XNA 4.
My game takes place on a ship that allows travel between decks. I have a Space with a number of boxes & spheres in it. When I change to another deck in the ship Im not sure what the best way to handle the Bepu Space & associated entities is (You can revisit an existing deck btw).
If I create a new Space without removing any entities in it, can I re-add them to another space again safely? I think they wont get updated so this is ok to do?
Would it be better to just remove all entities and create new ones every deck? If so whats the correct way of doing this?
I assume I could create multiple Spaces. If so I need minimum overhead so how do I freeze the Spaces im not using? Is there a built in way of doing this? (I think this would be my prefered method if its cheap on CPU/memory).
Thanks for the advice.
My game takes place on a ship that allows travel between decks. I have a Space with a number of boxes & spheres in it. When I change to another deck in the ship Im not sure what the best way to handle the Bepu Space & associated entities is (You can revisit an existing deck btw).
If I create a new Space without removing any entities in it, can I re-add them to another space again safely? I think they wont get updated so this is ok to do?
Would it be better to just remove all entities and create new ones every deck? If so whats the correct way of doing this?
I assume I could create multiple Spaces. If so I need minimum overhead so how do I freeze the Spaces im not using? Is there a built in way of doing this? (I think this would be my prefered method if its cheap on CPU/memory).
Thanks for the advice.