Object disappears after inserting it into snapshot

Hello, I am trying to copy a display group using a snapshot. When I insert my group into my snapshot group, the original group disappears off screen. I guess this occurs because it is no longer on stage, and instead is in this “off-screen” snapshot group? My question is, how can I add my group to my snapshot group, allow the snapshot group to validate in the current frame, then re-insert my group onto the stage all in the same frame?

Currently this (psuedo) code causes the snapshot to not draw:

fakePiece = display.newSnapshot(pGroup, size * 2, size)
fakePiece.group:insert(displayGroup)
fakePiece:invalidate()
originalGroup:insert(displayGroup)

I think because the displayGroup is not in the snapshot.group at the end of the frame, but I’m not 100% sure on that. Any help is appreciated.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.