Is it possible to have masks for physics collision detection

I’m looking to load a texture representing my game level and have it have a mask with black and white to carve out a “labyrinth” (or path) through the level. I’d then have an object moving through the level.

The question is, can I use the mask to determine collisions of the object with the level walls (path walls)?

So as long as the object moves through black areas no collisions will occur, and as soon as it hits a wall (white area) the collision event will fire.

Will that work?

Hi there,

the simple answer is no, you can’t.

The problem is that corona grants no access to the pixeldata of images. That means till now there’s no way to generate objects (that contain the collision) from an image’s pixels.

Might change in the future, but it will take some time I think.

Thanks for confirming that for me. 

Hi there,

the simple answer is no, you can’t.

The problem is that corona grants no access to the pixeldata of images. That means till now there’s no way to generate objects (that contain the collision) from an image’s pixels.

Might change in the future, but it will take some time I think.

Thanks for confirming that for me.