I was wondering what is the best way to enable and disable collision detection.
What I need to do is for some world objects to be passable (no collision) by the player at certain times, and impassable (has collision detection) at other times. My world objects are triangle meshes and the player are made out of primitive boxes as the collision skin.
The only way I can see of doing this is to add and remove the collision skins in the physics system depending on what I want, but I am afraid I will get some performance issue. Also, I don't want the passable object to turn back on its collision detection when a player is still inside the object. If I remove the collision skins from the physics system, then there's no way for me to test whether the player is inside a disabled collision skin.
Any suggestions as to how I may be able to approach this problem?