changing isSensor on-the-fly

Hello everyone,

I need to change the isSensor property at runtime in order to make the object acting like a ghost. When I set the property from false to true, things work just fine. but when I set it back to false, if an object is colliding another at this time there is no effect unless I manually (drag and drop) separate them. Then the collision detection works again.

Is there any way I could make a magic "updateCalculation" function that would automatically "uncollide" the two boxes ?

Thank you very much.

Original thread: https://box2d.org/forum/viewtopic.php?t=5766