Drawing part of a texture

We want to create a game with destructible objects.

Based on where an object is sliced, we need to create 2 objects which are two parts of the original object.

However, we dont know how to draw just a part of the texture.

Any thought on this?

Thanks in advance

not possible yet. search through the "feature request" board and add your +1 to the relevant posts on dynamic masking


Wasn't bitmap masking added in the last release? Can you rotate masks? If so, you could rotate the mask to the angle of the cut.

yes but it's a fixed mask loaded from a .PNG file. which isnt really going to suit your needs

Dynamic masking ( masking using display.newGroup() ) would be incredibly useful. Is this being considered as a new feature?

Does anyone know of a workaround for this? Gradually revealing an image is a pretty fundamental task and requiring a full sprite sheet seems somewhat excessive when a partial render is all that's required?

Nevermind, I worked around it. I made a 100% mask image and then just shifted the masked object's .maskX property to slowly reveal it over time.

views:955 update:2011/9/26 15:43:22
corona forums © 2003-2011