I would like to know how I can insert more than one mask for the same group of objects. Like to do is like in the game goof troop

I would like to reveal the objects of the same group with separate masks. in my platform game the mask of the player can touch the mask of the objects giving the effect as in the game of the goof troop.

I think you could mask a black rect (I guess that is what you are already doing), and then create a snapshot from it and add the second mask that the snapshot group.

Thanks a lot for the help. I am trying everything in the corona, but still without success for two masks revealing my group of camera.

I think you must use 2 different images and create 2 different masks. Apply the first one to the rect and the second one to the snapshot.

This is the code sample and next to it an screenshot showing the result :slight_smile:

	local mask = graphics.newMask( "images/mask.png" )
	local mask2 = graphics.newMask( "images/mask2.png" )
	local rect = display.newRect(screenMiddleX, screenMiddleY, screenWidth, screenHeight)
	rect.x, rect.y = 100,0
	rect:setMask( mask )
	rect.maskX, rect.maskY = 300, 300
	local snapshot = display.newSnapshot(screenWidth, screenHeight)
	snapshot.x, snapshot.y = screenMiddleX, screenMiddleY
	snapshot.group:setMask( mask2 )