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 [import]uid: 30141 topic_id: 6820 reply_id: 306820[/import]

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

regards
J [import]uid: 6645 topic_id: 6820 reply_id: 23833[/import]

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. [import]uid: 12108 topic_id: 6820 reply_id: 23843[/import]

yes but it’s a fixed mask loaded from a .PNG file. which isnt really going to suit your needs [import]uid: 6645 topic_id: 6820 reply_id: 23890[/import]

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

[import]uid: 6893 topic_id: 6820 reply_id: 27956[/import]

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?
[import]uid: 44812 topic_id: 6820 reply_id: 53242[/import]

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.
[import]uid: 44812 topic_id: 6820 reply_id: 53245[/import]