Is there a dynamic way to cut a sprite in half? Meaning, WITHOUT using either of the following:
Is there any method, like dynamically copying part of an image onto another sprite?
I have about 100 vehicles/sprites already created for an RTS game--when a unit is destroyed, I want to create an animation of the vehicle breaking into 2 halves. But to go back and create a "splitting animation" sprites for all 100 vehicles would probably take another month. Is there a faster, more dynamic/run-time way to do this?
Develop games in your browser. Powerful, performant & highly capable.
If the collision mask is not important and all you need is to split the graphics, you can use a mask object.
Create 2 mask objects (color the unwanted parts in black the rest leave transparent) and set the blending mode to Destination out
On the layer settings where the object is on set:
1. Transparent YES
2. Force own texture YES
Now create 2 instances of your object and the 2 masks and pin them to the object.
If the mask is the same on both sides you can just mirror the same mask.