Matter - Create Zone

Hello,

I would like with Matter, to create a rectangle (or sprite) without texture. This rectangle would be an area traversable by other objects. But I would still like to detect if an object is in contact (or inside) of it.

I would like the player to be able to create rooms / areas (with the mouse). When a PNG is in the room or in contact with it, then something happens.

I was thinking of using “Bodies.rectangle (0, 0, 100, 200, {isSensor: true});”
to detect collision with the “matterCollision” plugin.

But I have to create a rectangle not “isSensor” otherwise the object falls below my world since it no longer has a real body. And suddenly with this new rectangle body, a PNG is able to move the part or locks on contact. I don’t want that.

But is there a simpler, cleaner way to create this?

Thank you in advance for your help !