Hi @ElectricDisk,
It’s not a special “trick” that’s making the ceiling “one sided”. The method is just to make your dropping objects into sensors when they start (above the ceiling and off screen), so they pass through it as they fall… but still trigger a collision event. Then on the “ended” of that collision event, as they pass below and outside the ceiling’s bounds, you change them into non-sensor objects so they can interact with your other boundaries and objects. Certainly, don’t remove the physics body in this case, it’s not necessary.
As for that error you’re getting, that’s fairly common and easily remedied. Basically, Box2D can’t perform some actions during while a collision is still “resolving itself”, so you just have to trigger some things using a tiny, never-will-be-detected timer of 10 milliseconds or so. This tells Box2D to resolve that event on the NEXT game cycle, and it will, safely.
Regards,
Brent [import]uid: 200026 topic_id: 36215 reply_id: 143941[/import]